UBUNTU 1604 installation diary
One install QQ International
Two apt-get install flash
Three fix the two months in the upper right corner of ubuntu1604
Four build a LAMP environment and install phpstudy
Five phpstudy installation and configuration
tips
Six mysql for linux user permissions import and export operations
Seven install Navicat
Eight Ubuntu install JDK
Nine myeclipse
Ten fiddler
My homepage www.csxiaoyao.com
I have used linux versions such as rhel, centos, ubuntu-14 before, and recently the entire system has been repartitioned, 40G is divided in the SSD, and Ubuntu 16.04 is installed. In the process of using Ubuntu, it can be seen that Ubuntu has taken a big step forward on the desktop system, and can even be used as the main mobile productivity tool. Hereby record the key ten steps for future reference.
installation:
unzip wine-qqintl.zip
sudo dpkg -i fonts-wqy-microhei_0.2.0-beta-2_all.deb ttf-wqy-microhei_0.2.0-beta-2_all.deb wine-qqintl_0.1.3-2_i386.deb
sudo apt-get install -f
Go to step 1
sudo apt-get install flashplugin-installer
gsettings set com.canonical.indicator.datetime time-format ‘custom’
gsettings set com.canonical.indicator.datetime custom-time-format ‘%m month%d day%A%H:%M:%S’
apt-get install LAMP
1. Install Apache
sudo apt-get install apache2
Check the Apache version:
apache2 -v
Browser access to Apache
2. Install PHP7
sudo apt-get install php7.0
Check the PHP version:
php7.0-v
3. Install libapache2-mod-php7.0
sudo apt-get install libapache2-mod-php7.0
Check if the installation is successful
cat /etc/apache2/mods-enabled/php7.0.load
4. Install MySQL
sudo apt-get install mysql-server
Set root password
Install php7.0-mysql
sudo apt-get install php7.0-mysql
5. Restart
Restart MySQL
sudo service mysql restart
Restart Apache
sudo service apache2 restart
6. test
Create a new php file phpinfo.php
sudo vim /var/www/html/phpinfo.php
Enter the php code, save and exit
<? php
echo phpinfo();?>
Browser access
wget -c http://lamp.phpstudy.net/phpstudy.bin
chmod +x phpstudy.bin
. /phpstudy.bin
1. Configuration file address
apache configuration file:
/phpstudy/server/httpd/conf/httpd.conf
PHP configuration file:
/phpstudy/server/php/etc/php.ini
Open the Mysql console
/phpstudy/mysql/bin/mysql -uroot -proot
( mysql -uroot -proot is invalid)
2. Install ftpd
wget -c http://lamp.phpstudy.net/phpstudy-ftpd.sh
chmod +x phpstudy-ftpd.sh
. /phpstudy-ftpd.sh
3. Configure virtual host
(1) Apache configuration include vhost file
/phpstudy/server/httpd/conf/vhosts/*.conf
(2) add domain name
The corresponding configuration file will be automatically generated in /server/httpd/conf/vhost/
(3) Modify apache configuration (non-phpstudy, phpstudy directly modify the configuration file under /server/httpd/conf/vhost/)
sudo vi /etc/apache2/sites-available/www.csxiaoyao.local.conf
< VirtualHost *:80>
ServerName www.csxiaoyao.local
ServerAlias www.csxiaoyao.local
DocumentRoot /var/www/www.csxiaoyao.local/public_html
< /VirtualHost>
Disable the default virtual host configuration (000.default.conf)
Enable new virtual host configuration
sudo a2dissite 000-default.conf
sudo a2ensite www.csxiaoyao.local.conf
Restart apache server
sudo service apache2 restart
(4) Modify hosts
sudo vim /etc/hosts
127.0.0.1 www.csxiaoyao.local
1. New user
//Login MYSQL
@> mysql -u root -p
@> password
//Create user
mysql> insert into mysql.user(Host,User,Password)values(‘localhost’,’sunshine’,password(‘19931128’));//Refresh the system permission table
mysql>flush privileges;//Log in after logout
mysql>exit;
@> mysql -u sunshine -p
@> enter password
mysql>login successful
2. User authorization
//Login MYSQL(ROOT)
@> mysql -u root -p
@> password
//Create a database for users(sunshine_db)
mysql>create database sunshine_db;//Authorize sunshine user sunshine_db database all permissions
@> grant all on sunshine_db.* to sunshine@localhost identified by ‘19931128’;//Refresh the system permission table
mysql>flush privileges;//If you specify partial permissions
mysql>grant select,update on sunshine_db.* to sunshine@localhost identified by ‘19931128’;//Refresh the system permission table
mysql>flush privileges;
[ tips]
(1) Select, insert, update, delete, create, drop, index, alter, grant, references, reload, shutdown, process, file has 14 permissions, which can be replaced by all privileges or all
(2) Database name. The table name is replaced with ., which means that the user is given the authority to operate all tables in all databases on the server
(3) The user address can be localhost, or ip address, machine name, domain name
'%' means connect from any address
(4) 'Connection password' cannot be empty
3. delete users
@> mysql -u root -p
@> password
mysql>DELETE FROM mysql.user WHERE User=”sunshine” and Host=”localhost”;
mysql>flush privileges;//Delete user's database
mysql>drop database sunshine_db;
4. Modify the specified user password
@> mysql -u root -p
@> password
mysql>update mysql.user set password=password(‘sunshine’) where User=”sunshine” and Host=”localhost”;
mysql>flush privileges;
mysql>quit;
**5. Import and export MySQL database command **5.1 Export
Export data and table structure
mysqldump -u username-p password database name>data storage name.sql
# /usr/local/mysql/bin/ mysqldump -uroot -p abc > abc.sql
Export only table structure
mysqldump -u username-p password-d database name>data storage name.sql
# /usr/local/mysql/bin/ mysqldump -uroot -p -d abc > abc.sql
[ tips]
/usr/local/mysql/bin/Is the mysql data directory
5.2 Import
Empty database
mysql>create database abc;
Import database
method 1:
(1) Select database
mysql>use abc;
(2) Set database encoding
mysql>set names utf8;
(3) Import Data
mysql>source /home/abc/abc.sql;
Method 2:
mysql -u username-p password database name<data storage name.sql
# mysql -usunshine -p abc < abc.sql
[ installation]
tar -zxvf /home/sunshine/download/navicat8_mysql_en.tar.gz
. /start_navicat
[ tips]
Fix garbled
locale -a
export LANG=zh_CN.utf8
[ Crack]
cd /home/sunshine/.navicat/
rm system.reg
The next time you start Navicat, it will regenerate and reset the 30-day trial period
getconf LONG_BIT
sudo mkdir /usr/java
sudo tar zxvf jdk-8u102-linux-x64.tar.gz -C /usr/java/
cd /usr/java/
sudo mv jdk1.8.0_102 jdk_8u102
sudo gedit /etc/environment
Insert missing content
PATH=”/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:$JAVA_HOME/bin”
export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
export JAVA_HOME=/usr/java/jdk_8u102
source /etc/environment
echo $JAVA_HOME
Output /usr/java/jdk_8u102
echo $CLASSPATH
Output.:/usr/java/jdk_8u102/lib:/usr/java/jdk_8u102/jre/lib
echo $PATH
Output /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/java/jdk_8u102/ bin
java -version
sudo gedit /etc/profile
# set Java environment
JAVA_HOME=/usr/java/jdk_8u102
export JRE_HOME=/usr/java/jdk_8u102/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
[ tips]
/etc/profile Environment variables for all users
/etc/enviroment system environment variables
Shell reading sequence when logging in to the system:
/etc/profile –> /etc/enviroment –> HOME/.profile–>HOME/.profile –> HOME/.env
Restart the computer
If you use IDE such as Myeclipse or install multiple jdk versions
(1) Modify the default JDK
sudo update-alternatives –install “/usr/bin/java” “java” “/usr/java/jdk_8u102/bin/java” 300
sudo update-alternatives –install “/usr/bin/javac” “javac” “/usr/java/jdk_8u102/bin/javac” 300
sudo update-alternatives –install “/usr/bin/javaws” “javaws” “/usr/java/jdk_8u102/bin/javaws” 300
The above is to establish links for different commands. If there are multiple JDKs, just replace the path and execute again to establish the link
Execute the following command to select the link. If only one link is established for each option, the system will not provide an option. If there are multiple links, select different options as needed
sudo update-alternatives –config java
sudo update-alternatives –config javac
sudo update-alternatives –config javaws
[ installation]
sudo chmod a+x myeclipse-pro-2014-GA-offline-installer-linux.run
sudo ./myeclipse-pro-2014-GA-offline-installer-linux.run
sudo chown -R root:root /opt/MyEclipse
sudo chmod -R a+r /opt/MyEclipse
sudo chmod -R a+w /opt/MyEclipse
sudo ln -s /opt/MyEclipse/myeclipse /usr/bin/myeclipse
sudo gedit /usr/share/applications/MyEclipse.desktop
Paste text
[ Desktop Entry]
Encoding=UTF-8
Name=MyEclipse 2014
Comment=IDE for Web&Java
Exec=/opt/MyEclipse/myeclipse
Icon=/opt/MyEclipse/icon.xpm
Terminal=false
Type=Application
Categories=GNOME;Application;Development;
StartupNotify=true
After saving, you can view the MyEclipse shortcut in Dash
[ Crack]
java -jar cracker.jar
sudo apt-get install mono-complete