Saturday, April 26, 2014

Initial Server Setup with CentOS 6

Initial Server Setup with CentOS 6


When you first begin to access your fresh new virtual private server, there are a few early steps you should take to make it more secure. Some of the first tasks can include setting up a new user, providing them with the proper privileges, and configuring SSH.

Step One—Root Login


Once you know your IP address and root password, login as the main user, root.


It is not encouraged to use root on a regular basis, and this tutorial will help you set up an alternative user to login with permanently.


ssh root@123.45.67.890


The terminal will show:


The authenticity of host ’69.55.55.20 (69.55.55.20)’ can’t be established.

ECDSA key fingerprint is 79:95:46:1a:ab:37:11:8e:86:54:36:38:bb:3c:fa:c0.

Are you sure you want to continue connecting (yes/no)?


Go ahead and type yes, and then enter your root password.

Step Two—Change Your Password


Currently your root password is the default one that was sent to you when you registered your droplet. The first thing to do is change it to one of your choice.


passwd


CentOS is very cautious about the passwords it allows. After you type your password, you may see a BAD PASSWORD notice. You can either set a more complex password or ignore the message—CentOS will not actually stop you from creating a short or simple password, although it will advise against it.

Step Three— Create a New User


After you have logged in and changed your password, you will not need to login again to your VPS as root. In this step we will make a new user, with a new password, and give them all of the root capabilities.


First, create your user; you can choose any name for your user. Here I’ve suggested Demo


/usr/sbin/adduser demo


Second, create a new user password:


passwd demo


Step Four— Root Privileges


As of yet, only root has all of the administrative capabilities. We are going to give the new user the root privileges.


When you perform any root tasks with the new user, you will need to use the phrase “sudo” before the command. This is a helpful command for 2 reasons: 1) it prevents the user from making any system-destroying mistakes 2) it stores all the commands run with sudo to the file ‘/var/log/secure’ which can be reviewed later if needed.


Let’s go ahead and edit the sudo configuration. This can be done through the default editor, which in CentOS is called ‘vi’


/usr/sbin/visudo


Find the section called user privilege specification.


It will look like this:


# User privilege specification

root ALL=(ALL) ALL


Under the details of root’s privileges, add the following line, granting all the permissions to your new user.


To began typing in vi, press “a”.


demo ALL=(ALL) ALL


Press Escape, :, w, q, then Enter to save and exit the file.

Step Five— Configure SSH (OPTIONAL)


Now it’s time to make the server more secure. These steps are optional. They will make the server more secure by making login more difficult.


Open the configuration file


sudo vi /etc/ssh/sshd_config


Find the following sections and change the information where applicable:


Port 25000

Protocol 2

PermitRootLogin no

UseDNS no


We’ll take these one by one.


Port: Although port 22 is the default, you can change this to any number between 1025 and 65536. In this example, I am using port 25000. Make sure you make a note of the new port number. You will need it to login in the future, and this change will make it more difficult for unauthorized people to log in.


PermitRootLogin: change this from yes to no to stop future root login. You will now only login as the new user.


Add this line to the bottom of the document, replacing demo with your username:


AllowUsers demo


Save and Exit

Step Six— Reload and Done!


Reload SSH, and it will implement the new ports and settings.


/etc/init.d/sshd reload


To test the new settings (don’t logout of root yet), open a new terminal window and login into your virtual server as your new user.


Don’t forget to include the new port number.


ssh -p 25000 demo@123.45.67.890


Your prompt should now say:


[demo@yourname ~]$


 


Source: CHAULV8X.COM



Initial Server Setup with CentOS 6

How To Install WordPress on Centos 6

How To Install WordPress on Centos 6


About WordPress



WordPress is a free and open source website and blogging tool that uses php and MySQL. It was created in 2003 and has since then expanded to manage 22% of all the new websites created and has over 20,000 plugins to customize its functionality.


Setup



The steps in this tutorial require the user to have root privileges. You can see how to set that up here in steps 3 and 4.


Before working with wordpress, you need to have LAMP installed on your server. If you don’t have the Linux, Apache, MySQL, PHP stack on your server, you can find the tutorial for setting it up here.


Once you have the user and required software, you can start installing wordpress!


Step One—Download WordPress



We can download WordPress straight from their website:


wget http://wordpress.org/latest.tar.gz

This command will download the zipped wordpress package straight to your user’s home directory. You can unzip it the the next line:


tar -xzvf latest.tar.gz

Step Two—Create the WordPress Database and User



After we unzip the wordpress files, they will be in a directory called wordpress in the home directory.


Now we need to switch gears for a moment and create a new MySQL directory for wordpress.


Go ahead and log into the MySQL Shell:


mysql -u root -p

Login using your MySQL root password, and then we need to create a wordpress database, a user in that database, and give that user a new password. Keep in mind that all MySQL commands must end with semi-colon.


First, let’s make the database (I’m calling mine wordpress for simplicity’s sake; feel free to give it whatever name you choose):


CREATE DATABASE wordpress;
Query OK, 1 row affected (0.00 sec)

Then we need to create the new user. You can replace the database, name, and password, with whatever you prefer:


CREATE USER wordpressuser@localhost;
Query OK, 0 rows affected (0.00 sec)

Set the password for your new user:


SET PASSWORD FOR wordpressuser@localhost= PASSWORD("password");
Query OK, 0 rows affected (0.00 sec)

Finish up by granting all privileges to the new user. Without this command, the wordpress installer will not be able to start up:


GRANT ALL PRIVILEGES ON wordpress.* TO wordpressuser@localhost IDENTIFIED BY 'password';
Query OK, 0 rows affected (0.00 sec)

Then refresh MySQL:


FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

Exit out of the MySQL shell:


exit

Step Three—Setup the WordPress Configuration



The first step to is to copy the sample wordpress configuration file, located in the wordpress directory, into a new file which we will edit, creating a new usable wordpress config:


cp ~/wordpress/wp-config-sample.php ~/wordpress/wp-config.php

Then open the wordpress config:


vi ~/wordpress/wp-config.php

Find the section that contains the field below and substitute in the correct name for your database, username, and password:


// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'wordpress');

/** MySQL database username */
define('DB_USER', 'wordpressuser');

/** MySQL database password */
define('DB_PASSWORD', 'password');

Save and Exit.


Step Four—Copy the Files



We are almost done uploading WordPress to the server. The final move that remains is to transfer the unzipped WordPress files to the website’s root directory.


sudo cp -r ~/wordpress/* /var/www/html

From here, WordPress has its own easy to follow installation form online.


However, the form does require a specific php module to run. If it is not yet installed on your server, download php-gd:


sudo yum install php-gd

Last of all restart Apache:


 sudo service httpd restart

Step Five—RESULTS: Access the WordPress Installation



Once that is all done, the wordpress online installation page is up and waiting for you:


Access the page by adding /wp-admin/install.php to your site’s domain or IP address (eg. example.com/wp-admin/install.php) and fill out the short online form (it should look like this).


Source: CHAULV8X | How To Install WordPress on CentOS 6



How To Install WordPress on Centos 6

How To Install WordPress on Centos 6.x.x


How To Install WordPress on Centos 6

About WordPress


WordPress is a free and open source website and blogging tool that uses php and MySQL. It was created in 2003 and has since then expanded to manage 22% of all the new websites created and has over 20,000 plugins to customize its functionality.

Setup


The steps in this tutorial require the user to have root privileges. You can see how to set that up here in steps 3 and 4.
Before working with wordpress, you need to have LAMP installed on your server. If you don’t have the Linux, Apache, MySQL, PHP stack on your server, you can find the tutorial for setting it up here.
Once you have the user and required software, you can start installing wordpress!

Step One—Download WordPress


We can download WordPress straight from their website:
wget http://wordpress.org/latest.tar.gz
This command will download the zipped wordpress package straight to your user’s home directory. You can unzip it the the next line:
tar -xzvf latest.tar.gz

Step Two—Create the WordPress Database and User


After we unzip the wordpress files, they will be in a directory called wordpress in the home directory.
Now we need to switch gears for a moment and create a new MySQL directory for wordpress.
Go ahead and log into the MySQL Shell:
mysql -u root -p
Login using your MySQL root password, and then we need to create a wordpress database, a user in that database, and give that user a new password. Keep in mind that all MySQL commands must end with semi-colon.
First, let’s make the database (I’m calling mine wordpress for simplicity’s sake; feel free to give it whatever name you choose):
CREATE DATABASE wordpress;
Query OK, 1 row affected (0.00 sec)
Then we need to create the new user. You can replace the database, name, and password, with whatever you prefer:
CREATE USER wordpressuser@localhost;
Query OK, 0 rows affected (0.00 sec)
Set the password for your new user:
SET PASSWORD FOR wordpressuser@localhost= PASSWORD("password");
Query OK, 0 rows affected (0.00 sec)
Finish up by granting all privileges to the new user. Without this command, the wordpress installer will not be able to start up:
GRANT ALL PRIVILEGES ON wordpress.* TO wordpressuser@localhost IDENTIFIED BY 'password';
Query OK, 0 rows affected (0.00 sec)
Then refresh MySQL:
FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
Exit out of the MySQL shell:
exit

Step Three—Setup the WordPress Configuration


The first step to is to copy the sample wordpress configuration file, located in the wordpress directory, into a new file which we will edit, creating a new usable wordpress config:
cp ~/wordpress/wp-config-sample.php ~/wordpress/wp-config.php
Then open the wordpress config:
vi ~/wordpress/wp-config.php
Find the section that contains the field below and substitute in the correct name for your database, username, and password:
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'wordpress');

/** MySQL database username */
define('DB_USER', 'wordpressuser');

/** MySQL database password */
define('DB_PASSWORD', 'password');
Save and Exit.

Step Four—Copy the Files


We are almost done uploading WordPress to the server. The final move that remains is to transfer the unzipped WordPress files to the website’s root directory.
sudo cp -r ~/wordpress/* /var/www/html
From here, WordPress has its own easy to follow installation form online.
However, the form does require a specific php module to run. If it is not yet installed on your server, download php-gd:
sudo yum install php-gd
Last of all restart Apache:
 sudo service httpd restart

Step Five—RESULTS: Access the WordPress Installation


Once that is all done, the wordpress online installation page is up and waiting for you:
Access the page by adding /wp-admin/install.php to your site’s domain or IP address (eg. example.com/wp-admin/install.php) and fill out the short online form (it should look like this).
Nguồn : chaulv8x.com

Học từ vựng hiệu quả với Hitek Coffee | Cafe Vì Cộng Đồng


Cách học từ vựng hiệu quả


Làm thế nào để có thể học được nhiều từ mới, làm sao để tăng lượng từ vựng của mình, làm sao để sử dụng tốt vốn từ… đó là câu hỏi của rất nhiều người học tiếng anh.


Tại sao cách học từ vựng hiệu quả lại quan trọng


Bạn đã tìm đến nhiều trung tâm, tốn nhiều thời gian và tiền bạc nhưng học rồi thì lại quên rồi. Cafe Vì Cộng Đồng luôn có những lớp học anh văn miễn phí. Giúp cho các bạn có nhu cầu học anh văn có được phương pháp học tập hiệu quả. Đoạn video sẽ giúp cách bạn :


  • Tự tin giao tiếp.

  • Đủ để bạn giao tiếp và học tập.

  • Tốn ít thời gian cho việc học từ mới.

Cách học từ vựng hiệu quả cho chính mình


Nhiều bạn trong câu lạc bộ lúc đầu cũng gặp tình trạng giống các bạn. Chúng tôi đã quyết tâm để tìm ra một phương pháp học từ vựng hiệu quả nhất và nhớ lâu nhất. Chúng tôi đã bỏ ra nhiều công sức cũng rất rất nhiều tiền bạc để theo học các khoá học trên thế giới cũng như tìm hiểu rất nhiều phương pháp học tập hiệu quả của Tony Buzzan, Adam Khoo, Nishant… Cuối cùng chúng tôi cũng đã tìm ra được cách giúp cho hàng ngàn người không chỉ ở Việt Nam mà cả trên thế giới ghi nhớ các từ vựng tiếng anh một cách nhanh chóng và hiệu quả.



Học từ vựng hiệu quả với Hitek Coffee | Cafe Vì Cộng Đồng

Sublime Text Workflow


I’m pleased to announce that my newest course on Hitek Coffee is out…and free to everyone! I have a confession: I’m a code editor addict, and have tried them all! I was an early adopter of Coda, a TextMate advocate, even a Vim convert. But all of that changed when I discovered Sublime Text 2, the best code editor available today.


I’ll demonstrate what I consider to be the perfect workflow.


In this free course, I’ll demonstrate what I consider to be the perfect workflow in Sublime Text 2. We’ll cover everything from the basic core features, such as multiple cursors and the command palette, to the most popular and useful plugins, to working with Sublime’s build system.


If you’re intrigued by Sublime Text, but haven’t yet dug into it, now is the perfect time. Let me convince you!


Outline


Here’s the full lesson outline for the course. You certainly don’t have to watch in order; skip around to the ones that interest you most!


Nguồn: TutPremium



Sublime Text Workflow

Phát âm chuẩn tiếng Anh - Tập 29 - Hitek Coffee | Cafe Vi Cong Dong

PHÁT ÂM CHUẨN TIẾNG ANH



Tập 29: Đếm bằng tiếng Anh – Counting


Hãy cùng Hitek Coffee tập đếm bằng tiếng Anh các bạn nhé!

SỐ ĐẾM

 0 ZERO





1one11eleven21twenty-one31thirty-one
2two12twelve22twenty-two40forty
3three13thirteen23twenty-three50fifty
4four14fourteen24twenty-four60sixty
5five15fifteen25twenty-five70seventy
6six16sixteen26twenty-six80eighty
7seven17seventeen27twenty-seven90ninety
8eight18eighteen28twenty-eight100a/one hundred
9nine19nineteen29twenty-nine1,000a/one thousand
10ten20twenty30thirty1,000,000a/one million
* Khi một số cần kết hợp giữa hàng triệu/ngàn/trăm ngàn/ngàn/trăm với hàng đơn vị hoặc hàng chục, ta thêm AND ngay trước hàng đơn vị hoặc hàng chục.

Thí dụ:

  110 – one hundred and ten

1,250 – one thousand, two hundred and fifty

2,001 – two thousand and one

* Trong tiếng Việt, ta dùng dấu . (dấu chấm) để phân cách mỗi 3 đơn vị số từ phải sang trái. Nhưng trong tiếng Anh, PHẢI dùng dấu , (dấu phẩy)

57,458,302

* Số đếm khi viết ra không bao giờ thêm S khi chỉ muốn cho biết số lượng của danh từ đi liền sau số.

VD: THREE CARS = 3 chiếc xe hơi  (THREE không thêm S )

* Nhưng khi bạn muốn nói số lượng con số nào đó nhiều hơn hai, bạn thêm S vào số chỉ số lượng con số

VD: FOUR NINES, 2 ZEROS = 4 SỐ 9, 2 SỐ 0

* Ngoài ra, những số sau đây khi thêm S sẽ có nghĩa khác, không còn là 1 con số cụ thể nữa mà là một cách nói ước chừng, nhớ là bạn phải có OF đằng sau:

TENS OF = hàng chục..

DOZENS OF = hàng tá…

HUNDREDS OF = hàng trăm

THOUSANDS OF = hàng ngàn

MILLIONS OF = hàng triệu

BILLIONS OF = hàng tỷ

Thí dụ: EVERYDAY, MILLIONS OF PEOPLE IN THE WORLD ARE HUNGRY. (Mỗi ngày có hàng triệu người trên thế giới bị đói)

* Cách đếm số lần:

- ONCE = một lần (có thể nói ONE TIME nhưng không thông dụng bằng ONCE)

- TWICE = hai lần (có thể nói TWO TIMES nhưng không thông dụng bằng TWICE)

- Từ ba lần trở lên, ta phải dùng ” Số từ + TIMES” :

+ THREE TIMES = 3 lần

+ FOUR TIMES = 4 lần

- Thí dụ:

+ I HAVE SEEN THAT MOVIE TWICE. = Tôi đã xem phim đó hai lần rồi.

SỐ THỨ TỰ

1stfirst11theleventh21sttwenty-first31stthirty-first
2ndsecond12thtwelfth22ndtwenty-second40thfortieth
3rdthird13ththirteenth23rdtwenty-third50thfiftieth
4thfourth14thfourteenth24thtwenty-fourth60thsixtieth
5thfifth15thfifteenth25thtwenty-fifth70thseventieth
6thsixth16thsixteenth26thtwenty-sixth80theightieth
7thseventh17thseventeenth27thtwenty-seventh90thninetieth
8theighth18theighteenth28thtwenty-eighth100thone hundredth
9thninth19thnineteenth29thtwenty-ninth1,000thone thousandth
10thtenth20thtwentieth30ththirtieth1,000,000thone millionth
Cách chuyển số đếm sang số thứ tự

* Chỉ cần thêm TH đằng sau số đếm là bạn đã chuyển nó thành số thứ tự. Với số tận cùng bằng Y, phải đổi Y thành I rồi mới thêm TH

-VD:     four –> fourth, eleven –> eleventh

           Twenty–>twentieth

Ngoại lệ:

  • one – first

  • two – second

  • three – third

  • five – fifth

  • eight – eighth

  • nine – ninth

  • twelve – twelfth
* Khi số kết hợp nhiều hàng, chỉ cần thêm TH ở số cuối cùng, nếu số cuối cùng nằm trong danh sách ngoài lệ trên thì dùng theo danh sách đó.

VD:

  • 5,111th = five thousand, one hundred and eleventh

  • 421st = four hundred and twenty-first 
* Khi muốn viết số ra chữ số ( viết như số đếm nhưng đằng sau cùng thêm TH hoặc ST với số thứ tự 1, ND với số thứ tự 2, RD với số thứ tự 3

VD:

  • first = 1st

  • second = 2nd

  • third = 3rd

  • fourth = 4th

  • twenty-sixth = 26th

  • hundred and first = 101st
* Danh hiệu của vua, hoàng hậu nước ngoài thường khi viết viết tên và số thứ tự bằng số La Mã, khi đọc thì thêm THE trước số thứ tự.

VD:

  • Viết : Charles II – Đọc: Charles the Second

  • Viết: Edward VI – Đọc: Edward the Sixth

  • Viết: Henry VIII – Đọc: Henry the Eighth

Phát âm chuẩn tiếng Anh - Tập 29 - Hitek Coffee | Cafe Vi Cong Dong

Phát âm chuẩn tiếng Anh - Tập 31 - Hitek Coffee | Cafe Vi Cong Dong

PHÁT ÂM CHUẨN TIẾNG ANH



Tập 31: Học hát ABC


Sau nhiều bài học vui nhộn và dí dỏm, Hitek Coffee sẽ tiếp tục bài số 31 với nội dung là học hát bài ABC.

Nào chúng ta cùng hát nhé! Đây cũng là dịp ôn lại bảng chữ cái các bạn nhé!



Phát âm chuẩn tiếng Anh - Tập 31 - Hitek Coffee | Cafe Vi Cong Dong