久久免费视频鬼狠狠_久久五月天和激情网_亚洲人成在线播放a偷伦_午夜无码免费视频一区二区

廣豐視角

關(guān)注互聯(lián)網(wǎng),關(guān)注技術(shù)開(kāi)發(fā),透析與分享移動(dòng)互聯(lián)網(wǎng)行業(yè)最新動(dòng)態(tài)

linux服務(wù)器搭建

時(shí)間:2019-02-17 13:35:16    閱讀:16835次 分類:APP開(kāi)發(fā)
http://blog.chinaunix.net/uid-17085332-id-2832243.html http://wenku.baidu.com/view/6781e29951e79b89680226f2.html http://51hired.com/questions/3300/yum%e5%ae%89%e8%a3%85mysql%e5%b9%b6%e8%ae%be%e7%bd%ae...

http://blog.chinaunix.net/uid-17085332-id-2832243.html
http://wenku.baidu.com/view/6781e29951e79b89680226f2.html
http://51hired.com/questions/3300/yum%E5%AE%89%E8%A3%85MySQL%E5%B9%B6%E8%AE%BE%E7%BD%AE%E5%AF%86%E7%A0%81
http://zhidao.baidu.com/question/46974713.html二級(jí)域名配置
http://www.hackbase.com/tech/2011-04-21/63390.html


1.添加yum repo php5.2.x
安裝使用testing庫(kù)的許可
rpm  -import  http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing
2.升級(jí)
yum upgrade php
3. 安裝Apahce, PHP, Mysql, 以及php連接mysql庫(kù)組件
yum -y install httpd php mysql mysql-server php-mysql
//安裝mysql擴(kuò)展
yum -y install mysql-connector-odbc mysql-devel libdbi-dbd-mysql
//安裝php的擴(kuò)展 
yum -y install php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc
//安裝apache擴(kuò)展
yum -y install httpd-manual mod_ssl mod_perl mod_auth_mysql httpd-devel


漏洞修復(fù)
yum update glibc 
yum -y update bash
4. 啟動(dòng)服務(wù)配置
# chkconfig httpd on [設(shè)置apache為自啟動(dòng)]
# chkconfig --add mysqld [mysql服務(wù)]
# chkconfig mysqld on [mysqld服務(wù)]
# service httpd start [自啟動(dòng) httpd 服務(wù)]
# service mysqld start [自啟動(dòng)mysqld服務(wù)]
5.設(shè)置mysql數(shù)據(jù)庫(kù)root帳號(hào)密碼。
mysqladmin -u root password ‘新密碼’ [引號(hào)內(nèi)填密碼]
讓mysql數(shù)據(jù)庫(kù)更安全
復(fù)制內(nèi)容到剪貼板
代碼:
mysql -u root -p [此時(shí)會(huì)要求你輸入剛剛設(shè)置的密碼,輸入后回車即可
mysql> DROP DATABASE test; [刪除test數(shù)據(jù)庫(kù)]
mysql> DELETE FROM mysql.user WHERE user = '; [刪除匿名帳戶]
mysql> FLUSH PRIVILEGES; [重載權(quán)限]
服務(wù)器安全




阿里云防doc攻擊設(shè)置




yum -y update bash




php.ini




open_basedir =/var/www/html:/tmp/ 
disable_functions =disable_functions =passthru,exec,shell_exec,system,fwrite,chmods,phpinfo,passthru,escapeshellarg,escapeshellcmd,proc_close,proc_open,dl,popen,show_source
display_errors =off 關(guān)閉錯(cuò)誤報(bào)告




隱藏 PHP 版本
expose_php Off




httpd.conf//關(guān)閉遍歷目錄
找到“
1
Options Indexes FollowSymLinks

將Indexes去掉,更改為“
1
Options  FollowSymLinks




用Apache服務(wù)器,可以通過(guò)配置來(lái)禁止該目錄下的PHP文件的訪問(wèn),有兩種方式:
方式一:.htaccess控制,適用于沒(méi)有服務(wù)器管理權(quán)限。
在可寫(xiě)文件夾的目錄下,建一個(gè).htaccess文件,內(nèi)容為:
         
       Order  allow,deny  
       Deny  from  all  
        




隱藏 Apache 版本信息
ServerTokens ProductOnly
ServerSignature Off




cookie 登錄安全性檢查 








mysql配置文件
cp /usr/share/mysql/my-medium.cnf /etc/my.cnf




$mysql = new Mysql();
$boot = $mysql->dbname("SELECT id FROM user_pw WHERE id=".$_COOKIE['uid']." AND pw='".$_COOKIE['pw']."' AND userName='".$_COOKIE['username']."'");


連接數(shù)據(jù)庫(kù)


把連接建立在 SSL 加密技術(shù)上可以增加客戶端和服務(wù)器端通信的安全性,
或者 SSH 也可以用于加密客戶端和數(shù)據(jù)庫(kù)之間的連接。如果使用了這些技術(shù)的話,攻擊者要監(jiān)視服務(wù)器的通信或者得到數(shù)據(jù)庫(kù)的信息是很困難的。
Mysql 安裝管理
yum install mysql 
yum install mysql-server 
yum install mysql-devel 
chgrp -R mysql /var/lib/mysql 
chmod -R 770 /var/lib/mysql 
service mysqld start  
mysql 
SET PASSWORD FOR root@localhost = PASSWORD(secret_password); 


cron服務(wù)是linux的內(nèi)置服務(wù),但它不會(huì)開(kāi)機(jī)自動(dòng)啟動(dòng)??梢杂靡韵旅顔?dòng)和停止服務(wù):




/sbin/service crond start
/sbin/service crond stop
/sbin/service crond restart
/sbin/service crond reload


蕪湖廣豐軟件有限公司(原中江網(wǎng)絡(luò)),成立于2005年,經(jīng)過(guò)10多年定制開(kāi)發(fā)經(jīng)驗(yàn),積累了大量技術(shù)儲(chǔ)備和定制開(kāi)發(fā)經(jīng)驗(yàn),是一家集軟件研發(fā)、互聯(lián)網(wǎng)應(yīng)用為一體的綜合信息技術(shù)服務(wù)提供商。公司擁有核心的策劃團(tuán)隊(duì)和專業(yè)的技術(shù)研發(fā)團(tuán)隊(duì),致力于采用領(lǐng)先的信息技術(shù),長(zhǎng)期為涉及智慧園區(qū)/廠區(qū)/校園領(lǐng)域的各個(gè)企業(yè)提供快速、高效、安全的信息技術(shù)支持。公司立足智慧園區(qū)和智慧教育行業(yè),通過(guò)軟硬件的研發(fā)和互聯(lián)網(wǎng)應(yīng)用,疏通各企業(yè)間“端到端”的信息傳輸,靈活滿足智慧園區(qū)和智慧教育企業(yè)間不同用戶的需求,為其提供完善的信息化解決方案。

廣豐軟件,gf-yun.com,安徽軟件開(kāi)發(fā),linux,服務(wù)器
廣豐軟件
智慧園區(qū)系統(tǒng)開(kāi)發(fā)