I have summarized some notes about ubuntu server in linux. For more information, see.
1. Solve Chinese garbled characters. Originally, I chose to install the system in Chinese for ease of use. As a result, the Chinese character in the command line shows a pile of square characters. Since it is a server system, use English. Modification content:
Sudo vim/var/lib/locales/supported. d/local
Keep only: en_US.UTF-8 UTF-8
Sodu vim/etc/default/locale
Take the following content:
LANG = zh_CN.UTF-8 ″
LANGUAGE = "zh_CN: zh"
To:
LANG = en_US.UTF-8 ″
LANGUAGE = "en_US: en"
Finally, restart the system.
2. vim usage: press I to enter the editing mode, Press esc to exit the editing mode, w to save the content but not exit the vim editor, and wq to save the content and exit the vim editor ,: q. Exit the vim editor when you have not modified the content. q! Drop edited content and force exit the vim editor.
3. Restart command: reboot, shutdown-r now; shutdown command: halt, poweroff, shutdown-h now
4. Set permissions: sudo chmod-R 777/var/www (enable www read/write permissions)
Sudo chmod 600 ××× (only the owner has read and write permissions)
Sudo chmod 644 ××× (the owner has the read and write permissions, and the group user only has the read permission)
Sudo chmod 700 ××× (only the owner has the permission to read, write, and execute the chmod)
Sudo chmod 666 ××× (everyone has read and write permissions)
Sudo chmod 777 ××× (everyone has the permission to read, write, and execute the chmod)
5. Install the PHP environment:
Sudo apt-get install php5 libapache2-mod-php5
6. Install mysql:
Sudo apt-get install mysql-server
After the installation is complete, you will be prompted to enter the password.
7. Install phpmyadmin:
Sudo apt-get install phpmyadmin
Because phpmyadmin is installed in/usr/share/phpmyadmin by default, you need to make a link with the command: sudo ln-s/usr/share/phpmyadmin/var/www /, then you can access it through the http://x.x.x.x/phpmyadmin.
8. install ftp:
Sudo apt-get install vsftpd
Run the following command to check whether the installation is successful: netstat-tul l grep ftp.
Back up sudo cp/etc/vsftpd. conf/etc/vsftpd. conf. old before modification
Modify vsftp settings: sudo/etc/vsftpd. conf
After modification, restart sudo/etc/init. d/vsftpd restart.
9. Use apt-get:
Install software: sudo apt-get install packagename
Delete software: sudo apt-get remove packagename
Detaching software completely includes deleting the configuration file: sudo apt-get-purge remove packagename
10. Install finger to view the user's home directory, startup shell, user name, address, and so on:
Sudo apt-get intall finger
Command: finger User Name