Thứ Hai, 20 tháng 1, 2014

Command Ubuntu

Copy file or Folder:

cp -R /path/to/FOLDER1/* /path/to/FOLDER2
Restart Apache Ubuntu:
sudo /etc/init.d/apache2 restart
Tìm 1 file (cd về gốc cd /):find -name 'php.ini'

Đổi password truy cập phpmyadmin: mysqladmin -u root password NEWPASSWORD




Chuyển đến thư mục home:
Mã:
cd ~/

Chuyển đến thư mục /var/cache
Mã:
cd /var/cache

Chuyển đến thư mục cha của thư mục hiện hành:
Mã:
cd ..
Nén file
$ sudo tar -zcvpf /tenfile.tar.gz /ten_folder

Tải 1 file trên url về (ví dụ wp):
$ wget http://wordpress.org/latest.tar.gz
Giải nén file này:
tar -xzvf latest.tar.gz
Copy vào thư mục khác:
sudo cp -r ~/wordpress/* /var/www/html

Thêm webite trong Ubuntu VPS DigitalOcean:

/etc/apache2/sites-enabled/file:

<VirtualHost *:80>

  ServerAdmin webmaster@vidu

  DocumentRoot /home/wordpress/public_html

  Servername vidu

  ServerAlias www.vidu

</VirtualHost>





<VirtualHost *:80>

  ServerAdmin webmaster@vidu

  DocumentRoot /home/wordpress/public_html
 
  Servername tenmien1.com
  ServerAlias www.tenmien1.com

</VirtualHost>

<VirtualHost *:80>

  ServerAdmin webmaster@vidu

  DocumentRoot /home/folder_thêm
 
  Servername tenmien2.com
  ServerAlias www.tenmien2.com

</VirtualHost>

Không có nhận xét nào:

Đăng nhận xét