[HOW TO] installing additional locales in Linux Ubuntu

Sometime you will need to add a new language to your Linux. And how to?

Here I show you the short guidance for this. Hope this help :)

1.Check which locales are supported
$locale -a

2. add the locales that you want (e.g. Russia is "ru" )
$sudo locale-gen ru_RU
$sudo locale-gen ru_RU.UTF-8

3. Also you can regenerate list (it will invoke locale-gen)
$sudo dpkg-reconfigure locales

4. Edit in /etc/default/locale

5. You can search in repositories to find the language pack:
$sudo apt-get search language-pack*

6. Check packages to be installed (ubuntu)
$check-language-support -l zh       #zh = Chinese
$sudo apt-get install above_result


Here you can reference:
  • Chinese - Simplified (zh_CN.UTF-8)
  • Chinese - Traditional (zh_TW.UTF-8)
  • English (en_US.UTF-8)
  • French (fr_FR.UTF-8)
  • German (de_DE.UTF-8)
  • Italian (it_IT.UTF-8)
  • Japanese (ja_JP.UTF-8)
  • Korean (ko_KR.UTF-8)
  • Portuguese - Brazilian (pt_BR.UTF-8)
  • Spanish (es_ES.UTF-8)
     
     

[HOW TO] install owncloud on CentOS 6.5

Today afternoon Viet Nam football national got the bad result when vs My-an-ma. I have a bad feel because of that.

And for what? Nothing :)

So I write this article as subject for sharing. Hope this help everybody.

What is owncloud? Do you know it? I think I do not must wait to answer from you. You are here and you know what you need.

Let's do it.

In this article, I use CentOS 6.5, owncloud version 8, php version >=5.4.0

Owncloud will be installed Apache as a dependencies. Therefore you can manually install:
#yum install httpd
#chkconfig --levels 235 httpd on
#/etc/init.d/httpd start

Also you need to allow http and https in SELINUX. From my point, you can disable SELINUX. Please remember, I do not recommend you do as me.
#vi /etc/selinux/config

SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
#SELINUXTYPE=targeted
SELINUXTYPE=disabled

Next step, you need to install MySQL, it will be stored owncloud's database.
#yum install mysql-server
#chkconfig --levels 235 mysqld on
#/etc/init.d/mysqld start

You must configure firstly as follows:
#mysql secure installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MySQL to secure it, we'll need the current
password for the root user. If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.

Set root password? [Y/n] <-- ENTER
New password: <-- yourrootsqlpassword
Re-enter new password: <-- yourrootsqlpassword
Password updated successfully!
Reloading privilege tables..
... Success!

By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] <-- ENTER
... Success!

Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] <-- ENTER
... Success!

By default, MySQL comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] <-- ENTER
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] <-- ENTER
... Success!

Cleaning up...



All done! If you've completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!

#mysql -u root -p
Put mysql's password here and create an database for owncloud.
CREATE DATABASE owncloud;
GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud_user'@'localhost' IDENTIFIED BY 'owncloud_user_pasword';
FLUSH PRIVILEGES;
exit

And ... now you download the source of owncloud
#wget https://download.owncloud.org/community/owncloud-8.0.0.tar.bz2
#tar -xjf owncloud-8.0.0.tar.bz2
#mv owncloud /var/www/html/owncloud/

#chown -R apache.apache /var/www/html/owncloud/

In Apache configuration, I recommend that you enable .htaccess to get a enhanced security features, by default .htaccess is disable in Apache configuration. To enable it, open your virtual host file, and make sure AllowOverride is set to All as follows:

#vi /etc/httpd/conf.d/owncloud.conf


<IfModule mod_alias.c>
Alias /owncloud /var/www/html/owncloud
</IfModule>
<Directory “/var/www/html/owncloud”>
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>

#/etc/init.d/httpd restart

Now, how you feel? It is right but it is not enough. To complete, you need to install php environment for owncloud.

Owncloud requires php>= 5.4.0 , therefore, you need to install php>=5.4.0.
#rpm -Uhv http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
#yum --enablerepo=remi install owncloud

Above command, php version 5.4 will automatically install.

Now you go to open web browser, type the address as http://your_ipaddress/owncloud , you will see a page that looks like this:


Click on Storage & database to select your database which was create above section. If you do not see your mysql database available that you should be restarted mysqld.
Click Finish setup. Login with your owncloud account, this account is a administrator. You can create an user as a member, group ...

What the fuck? Thailand have just won Indonesia. Thailand is a great team. They are professional teams.

Let's go home. I need to take a bath :D

Thank you for your coming here!


Thank you for reading this article, please a comment if you are interested.

Tiến Phan - R0039

Knowledge is Endless

Sharing for Success
 

[HOW TO] Import VPN to Ubuntu/ CentOS/ Fedora

Yesterday I created a VPS in di****o****. All is well.
Now my client access to VPN which was created in VPS to go out of company.

How to import vpn to ubuntu/ fedora client? Here I show you.

You must be get the client.ovpn file from your administrator.Do it follows:

1. Go your home directory (e.g. /home/rocky, create vpn folder)
2. copy the client.ovpn to /home/rocky/vpn
3. copy the file client.ovpn to client.ovpn.orig
4. create 4 files as below:
  • ca.crt: copy the text between <ca> </ca> from client.ovpn
  • client.crt: copy the text between <cert> </cert>
    from client.ovpn
  • client.key: copy the text between <key> </key>
    from client.ovpn
  • ta.key: copy the text between <tls-auth> </tls-auth>
    from client.ovpn
5. modify the client.ovpn file
Find ## --BEGIN RSA SIGNATURE-- , add the text below and save.

ca ca.crt
cert client.crt
key client.key
tls-auth ta.key

6. Go to Configure the Network Manager, click VPN tab and click Import and select client.ovpn file


7. Password with Certificates (TLS)
8. Click on Advanced -> TLS Authentication Tab
9. Key Direction must be set based on the key direction in your client.ovpn file
10. Open the client.ovpn file and search for "key-direction" and note the number that mine is key-direction 1


11. Put this number in the Key Direction field in the TLS Authentication Tab
12. Save & connect to enjoy :)

Refer: https://naveensnayak.wordpress.com/2013/03/04/ubuntu-openvpn-with-ovpn-file/

Thank you for reading this article, please a comment if you are interested.

Tiến Phan - R0039

Knowledge is Endless

Sharing for Success