版本 : jdk 1.8java
前奏 : 檢查是否已經安裝並配置 jdk mysql
執行 : java , javac , java -versionlinux
1, 下載 jdk-8u131-linux-x64.tar.gz 安裝包sql
2, 使用winScp將 安裝包上傳到 服務器目錄中 , 我上傳到 /usr/local/javashell
3, 使用xshell 打開安裝目錄 , 執行 tar -zxvf jdk-8u131-linux-x64.tar.gz數據庫
4, 配置環境變量apache
使用vim /etc/profile編輯profile文件 ,加入如下配置vim
# /etc/profile # System wide environment and startup programs, for login setup # Functions and aliases go in /etc/bashrc # It's NOT a good idea to change this file unless you know what you # are doing. It's much better to create a custom.sh shell script in # /etc/profile.d/ to make custom changes to your environment, as this # will prevent the need for merging in future updates. pathmunge () { case ":${PATH}:" in *:"$1":*) ;; *) if [ "$2" = "after" ] ; then PATH=$PATH:$1 else PATH=$1:$PATH fi esac } JAVA_HOME=/usr/local/java/jdk1.8.0_131 PATH=$JAVA_HOME/bin:$PATH CLASSPATH=$JAVA_HOME/jre/lib/ext:$JAVA_HOME/lib/tools.jar export PATH JAVA_HOME CLASSPATH
5 , 檢查是否安裝配置完成centos
執行 : java , javac , java -version瀏覽器
1, 檢查是否已經安裝了svn
[root@VM_49_106_centos repo]# rpm -qa subversion subversion-1.6.11-15.el6_7.x86_64
2, 若是發現安裝的svn版本太低, 可執行卸載
[root@localhost modules]# yum remove subversion
3, 安裝
[root@localhost modules]# yum install subversion
4, 驗證安裝
[root@VM_49_106_centos repo]# svnserve --version svnserve, version 1.6.11 (r934486) compiled Aug 17 2015, 08:37:43 Copyright (C) 2000-2009 CollabNet
5, 建立代碼庫
SVN軟件安裝完成後還須要創建SVN庫
[root@localhost modules]# mkdir -p /opt/svn/repo [root@localhost modules]# svnadmin create /opt/svn/repo
執行上面的命令後,自動創建repo測試庫,查看/opt/svn/repo 文件夾發現包含了conf, db,format,hooks, locks, README.txt等文件,說明一個SVN庫已經創建。
6, 配置代碼庫
進入上面生成的文件夾conf下,進行配置
[root@localhost modules]# cd /opt/svn/repo/conf
用戶密碼passwd配置
[root@localhost password]# cd /opt/svn/repos/conf [root@admin conf]# vim passwd
修改passwd爲如下內容:
[users] # harry = harryssecret # sally = sallyssecret hello=123
用戶名=密碼
這樣咱們就創建了hello用戶, 123密碼
以上語句都必須頂格寫, 左側不能留空格, 不然會出錯.
權限控制authz配置
[root@admin conf]# vim authz
目的是設置哪些用戶能夠訪問哪些目錄,向authz文件追加如下內容:
#設置[/]表明根目錄下全部的資源 [/] 或者寫成[repl:/] hello = rw
意思是hello用戶對repo測試庫下全部的目錄有讀寫權限,固然也能夠限定。
若是是本身用,就直接是讀寫吧。
以上語句都必須頂格寫, 左側不能留空格, 不然會出錯.
服務svnserve.conf配置
[root@admin conf]# vim svnserve.conf 追加如下內容: [general] #匿名訪問的權限,能夠是read,write,none,默認爲read anon-access=none #使受權用戶有寫權限 auth-access=write #使用哪一個文件做爲帳號文件 password-db=passwd # #使用哪一個文件做爲權限文件 authz-db=authz # 認證空間名,版本庫所在目錄 realm=/opt/svn/repositories
以上語句都必須頂格寫, 左側不能留空格, 不然會出錯.
7, 啓動svn版本庫
執行 ps -ef | grep svn 查看svn進程, 先將原先進程殺死
kill -9 進程id
而後執行啓動命令 :
svnserve -d -r /var/svn/svnrepos 後面跟版本庫所在路徑
1 , 因爲Tomcat須要JDK的支持,因此在安裝Tomcat以前須要先安裝JDK。
2 , 到 tomcat官網下載 tar.gz 包
3 , 將 tar.gz 包 上傳到服務器 , 我選擇的目錄是 /usr/local 準備將tomcat解壓到該目錄
4 , 解壓
tar -zxvf /alidata/server/apache-tomcat-7.0.54.tar.gz
5 , 解壓成功後 ,到tomcat 的 bin 目錄中, ./start.sh
6 , 瀏覽器訪問 , 若是不能訪問, 檢查 端口放開狀況, 若是是阿里雲, 騰訊雲, 登陸控制檯設置安全組, 管理端口開放狀況
採用yum安裝的方式很是簡單
首先在官網上面找到對應的連接,而後使用wget命令進行下載到本地
wget http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm rpm -i mysql-community-release-el6-5.noarch.rpm
查看一下可以安裝的MySQL
yum list|grep mysql
下面直接使用yum安裝客戶端
yum install mysql-community-client.i686
安裝服務器端
yum install mysql-community-server.x86_64
安裝完成以後重啓一下就能夠了
Service mysqld restart
因爲mysql剛剛安裝完的時候,mysql的root用戶的密碼默認是空的,因此咱們須要及時用mysql的root用戶登陸(第一次回車鍵,不用輸入密碼),並修改密碼
# mysql -u root # use mysql; # update user set password=PASSWORD("這裏輸入root用戶密碼") where User='root'; # flush privileges;
關閉mysql
Service mysqld stop
剛安裝的mysql , 使用客戶端在遠端鏈接報錯信息以下
解決方案 :
1, 登陸mysql
[root@iz2zecw1gpc5cduk9e3usgz /]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 5 Server version: 5.6.36 MySQL Community Server (GPL)
2, 切換到 mysql數據庫的 user表
mysql> use mysql Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> select * from user;
結果以下
------------+--------------+---------------+-------------+-----------------+----------------------+-----------------------+-----------------------+------------------+ | Host | User | Password | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv | References_priv | Index_priv | Alter_priv | Show_db_priv | Super_priv | Create_tmp_table_priv | Lock_tables_priv | Execute_priv | Repl_slave_priv | Repl_client_priv | Create_view_priv | Show_view_priv | Create_routine_priv | Alter_routine_priv | Create_user_priv | Event_priv | Trigger_priv | Create_tablespace_priv | ssl_type | ssl_cipher | x509_issuer | x509_subject | max_questions | max_updates | max_connections | max_user_connections | plugin | authentication_string | password_expired | +-------------------------+------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+------------+--------------+------------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+-----------------------+-----------------------+------------------+ | localhost | root | *CCF93CD382F05D5D7854FDAAEC56C9B8E3E1F23B | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | | | | | 0 | 0 | 0 | 0 | mysql_native_password | | N | | iz2zecw1gpc5cduk9e3usgz | root | *CCF93CD382F05D5D7854FDAAEC56C9B8E3E1F23B | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | | | | | 0 | 0 | 0 | 0 | mysql_native_password | | N | | 127.0.0.1 | root | *CCF93CD382F05D5D7854FDAAEC56C9B8E3E1F23B | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | | | | | 0 | 0 | 0 | 0 | mysql_native_password | | N | | ::1 | root | *CCF93CD382F05D5D7854FDAAEC56C9B8E3E1F23B | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | | | | | 0 | 0 | 0 | 0 | mysql_native_password | | N | | localhost | | | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | | | | | 0 | 0 | 0 | 0 | mysql_native_password | NULL | N | | iz2zecw1gpc5cduk9e3usgz | | | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | | | | | 0 | 0 | 0 | 0 | mysql_native_password | NULL | N | +-------------------------+------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+------------+--------------+------------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+-----------------------+-----------------------+------------------+ 6 rows in set (0.00 sec)
第一列數據 Host表明可以訪問的地址
準備加上一行數據, 或者修改其中一行, 設置 Host爲 % , 表明任何 IP均可以訪問
修改以後的結果 (關鍵是最後一條數據)
------------+--------------+---------------+-------------+-----------------+----------------------+-----------------------+-----------------------+------------------+ | Host | User | Password | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv | References_priv | Index_priv | Alter_priv | Show_db_priv | Super_priv | Create_tmp_table_priv | Lock_tables_priv | Execute_priv | Repl_slave_priv | Repl_client_priv | Create_view_priv | Show_view_priv | Create_routine_priv | Alter_routine_priv | Create_user_priv | Event_priv | Trigger_priv | Create_tablespace_priv | ssl_type | ssl_cipher | x509_issuer | x509_subject | max_questions | max_updates | max_connections | max_user_connections | plugin | authentication_string | password_expired | +-------------------------+------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+------------+--------------+------------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+-----------------------+-----------------------+------------------+ | localhost | root | *CCF93CD382F05D5D7854FDAAEC56C9B8E3E1F23B | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | | | | | 0 | 0 | 0 | 0 | mysql_native_password | | N | | iz2zecw1gpc5cduk9e3usgz | root | *CCF93CD382F05D5D7854FDAAEC56C9B8E3E1F23B | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | | | | | 0 | 0 | 0 | 0 | mysql_native_password | | N | | 127.0.0.1 | root | *CCF93CD382F05D5D7854FDAAEC56C9B8E3E1F23B | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | | | | | 0 | 0 | 0 | 0 | mysql_native_password | | N | | % | root | *CCF93CD382F05D5D7854FDAAEC56C9B8E3E1F23B | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | | | | | 0 | 0 | 0 | 0 | mysql_native_password | | N | +-------------------------+------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+------------+--------------+------------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+-----------------------+-----------------------+------------------+ 4 rows in set (0.00 sec)
如今客戶端能夠遠程鏈接數據庫了