2013年9月29日 星期日

#2003-伺服器並無回應phpmyadmin install on centOS 5.5

phpMyAdmin Trouble Shooting!
#yum install mysql-server mysql php-mysql php-mbstring libmcrypt php-mcrypt
#wget http://sourceforge.net/projects/phpmyadmin/files%2FphpMyAdmin%2F2.11.11%2FphpMyAdmin-2.11.11-all-languages.tar.gz
#tar zxvf phpMyAdmin-2.11.11-all-languages.tar.gz -C /var/www/html/
# cd /var/www/html/
#mv phpMyAdmin-2.11.11-all-languages phpMyAdmin
# cd phpMyAdmin/
#chkconfig mysqld on
#service mysqld start
#mysqladmin -u root password 你的密碼
#cp ./config.sample.inc.php ./config.inc.php
#vi ./config.inc.php$cfg['Servers'][$i]['auth_type'] = 'http'; $cfg['Servers'][$i]['host'] = 'example.com.tw';
#/etc/rc.d/init.d/httpd start
#vi /etc/httpd/conf/httpd.conf391 DirectoryIndex index.html index.html.var index.php
#chmod o-w config.inc.php
#mysql -u root -p < /var/www/html/phpMyAdmin/scripts/create_tables_mysql_4_1_2+.sql
#/etc/rc.d/init.d/httpd start

$cfg['Servers'][$i]['auth_type'] = 'http' ====>執行結果



$cfg['Servers'][$i]['auth_type'] = 'cookie' ====>執行結果




解決方案:
問題在:
config.inc.php
$cfg['Servers'][$i]['auth_type'] = 'http';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'socket';







架設VPN--學校防火牆規則設定 .

1.登入學校防火牆:




2.輸入管理者帳號密碼






















3.選擇左方選單"防火牆"



4.選擇"服務"



5.選擇"用戶自訂"




















6.按"Create New"





7.輸入名稱,目的埠輸入1723




8.在左方選單選"防火牆策略"更改"internal->wan1"的"Basic"




9.將左方欄的VPN名稱右移到右方欄




10.按下"確定"防火牆規則已算完成


Client 端VPN設定

用戶端設定:開始-->控制台-->網路和網際網路-->網路和共用中心




















連線到工作地點



















使用我的網際網路連線



















網路位址:輸入140.127.X.X(學校某一個實體IP)
目的名稱:隨便打



















按下一步..輸入帳號密碼即可...(帳號密碼是VPN的使用群組..使用者)




















刪除VPN連線:選左邊選單中"變更介面卡設定


















滑鼠右鍵..刪除VPN


架設VPN-DS-211j設定







VI文字編輯器

VI文字編輯器:
命令模式
*練習游標移動
M <畫面中間>
L <畫面底端>
H <畫面頂端>
G <檔案尾>
1G/gg <檔案首>
20G <第20行>
h <游標向左>
j <游標向下>
k <游標向上>
l <游標向右>
請按i或insert鍵按鍵<進入插入模式>
按ESC鍵退出插入模式,進入命令模式
shift+: 進入命令模式
:w!寫
:q!離開
:wq!儲存且離開
u <undo 復原>
p <貼上>
dd <刪除>
5dd <刪除5 行>
yy <複製>
3yy <複製3 行>
可以vi /etc/vimrc 做設定
*相關設定
:syntax on <開啟語法檢查>
:set nu <顯示行號>
:set nonu <不顯示行號>
:set ic <不區分大小寫>
:set noic <區分大小寫>
:set hlsearch <高亮度搜尋>
:set nohlsearch <取消高亮度搜尋>
:set backspace=2 <啟用 backspace>
*取代練習:
在命令列下輸入:
:%s/httpd.conf/http.bak/gc <%搜尋全部, s 取代, g 全部取代, c 確認>

install mysql+apache2+phpMyadmin on opensuse

#su - root

#輸入密碼以root身分登入,使用終端機

#進入yast2 啟動xinetd服務

#yast2 -i mysql mysql-client

#chkconfig  mysql  --list

#/etc/init.d/mysql start

#mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQLSERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!In order to log into MySQL to secure it, we’ll need the currentpassword for the root user. If you’ve just installed MySQL, andyou haven’t set the root password yet, the password will be blank,so you should just press enter here.Enter current password for root (enter for none): <- ENTER

OK, successfully used password, moving on…Setting the root password ensures that nobody can log into the MySQLroot user without the proper authorisation.

Set root password? [Y/n] <- Y

New password: <- 輸入MySQL root password

Re-enter new password: <- 再確認root password

Password updated successfully!

Reloading privilege tables..

…Success!

By default, a MySQL installation has an anonymous user, allowing anyoneto log into MySQL without having to have a user account created forthem. This is intended only for testing, and to make the installationgo a bit smoother. You should remove them before moving into aproduction environment.Remove anonymous users? [Y/n] <- Y

…Success!

Normally, root should only be allowed to connect from ‘localhost’. Thisensures that someone cannot guess at the root password from the network.Disallow root login remotely? [Y/n] <- Y

…Success!

By default, MySQL comes with a database named ‘test’ that anyone canaccess. This is also intended only for testing, and should be removedbefore moving into a production environment.

Remove test database and access to it? [Y/n] <- Y

- Dropping test database…… Success!- Removing privileges on test database…

… Success!

Reloading the privilege tables will ensure that all changes made so farwill take effect immediately.Reload privilege tables now? [Y/n] <- Y

… Success!

Cleaning up…All done! If you’ve completed all of the above steps, your MySQLinstallation should now be secure.Thanks for using MySQL!

#yast2 -i apache2

#chkconfig  apache2 --list

#/etc/init.d/apache2 start

#若無法順利啟動,按電腦的install/remove software修正apache2

#yast2 -i apache2-mod_php5

#/etc/init.d/apache2 restart

#vi /srv/www/htdocs/info.php



<?php

phpinfo();

?>

#yast2 -i php5-mysql php5-bcmath php5-bz2 php5-calendar php5-ctype php5-curl php5-dom php5-ftp php5-gd php5-gettext php5-gmp php5-iconv php5-imap php5-ldap php5-mbstring php5-mcrypt php5-odbc php5-openssl php5-pcntl php5-pgsql php5-posix php5-shmop php5-snmp php5-soap php5-sockets php5-sqlite php5-sysvsem php5-tokenizer php5-wddx php5-xmlrpc php5-xsl php5-zlib php5-exif php5-fastcgi php5-pear php5-sysvmsg php5-sysvshm

#/etc/init.d/apache2 restart

#cd /srv/www/htdocs

#wget http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/3.5.8.2/phpMyAdmin-3.5.8.2-all-languages.tar.gz/download#!md5!040ef1264a9b0b07dcaa2bb0cce7aa72

#tar zxvf phpMyAdmin-3.5.8.2-all-languages.tar.gz -C /srv/www/htdocs/

#mv phpMyAdmin-3.5.8.2-all-languages phpmyadmin




















#若出現

























#/etc/init.d/mysql restart 

#測試用root登入