安裝Mysql
# yum -y install mysql-server
# mysqladmin -u root password 'your password'
安裝 php
# yum -y install php php-mysql php-gd php-mbstring
# vi /etc/php.ini <= 自行修改您要的值,內容參考如下
max_execution_time = 300
max_input_time = 600
memory_limit = 160M
post_max_size = 80M
upload_max_filesize = 20M
安裝 phpMyAdmin
# cd /var/www/html
# wget http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/2.11.11/phpMyAdmin-2.11.11-all-languages.tar.gz/download
# tar -zxvf phpMyAdmin-XXX.tar.gz
# mv phpMyAdmin-XXX phpMyAdmin
# cp /var/www/html/phpMyAdmin/libraries/config.default.php /var/www/html/phpMyAdmin/config.inc.php
# vi /var/www/html/phpMyAdmin/config.inc.php
$cfg['PmaAbsoluteUri'] = ''
改成 $cfg['PmaAbsoluteUri'] = 'http://ip/phpMyAdmin/';
$cfg['Servers'][$i]['auth_type'] = 'config'
改成 $cfg['Servers'][$i]['auth_type'] = 'http';
PS .開啟 phpMyAdmin 的首頁時, 出現"php 5.2+ is required"表示你裝phpMyAdmin版本要用到php5.2以上的版本
# chkconfig --level 2345 httpd on
讓tomcat開機時啟動
# touch /etc/init.d/tomcat
# chmod 755 /etc/init.d/tomcat
# vi /etc/init.d/tomcat
內容如下
#!/bin/bash
# process init file for tomcat
#
# chkconfig: 2345 90 80
# description: Apache Tomcat Daemon
#
# processname: /usr/local/tomcat/bin/startup.sh and /usr/local/tomcatbin/shutdown.sh
start() {
echo -n "Starting up Tomcat: ";echo "";
/usr/local/tomcat/bin/startup.sh
}
stop() {
echo -n "Shutting down Tomcat: ";echo "";
/usr/local/bin/shutdown.sh
}
restart() {
echo "Restarting Tomcat:"
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
*)
echo "Usage: Tomcat {start|stop|restart}"
exit 1
esac
測試一下啟動,停止 tomcat
# service tomcat start
# service tomcat stop
確認process有跑嗎
# ps -ef|grep tomcat
確認目前有tomcat這個服務在跑嗎?應該沒有才對喔!
# chkconfig --list|grep tomcat
加進來
# chkconfig --add tomcat
確認
# chkconfig --list|grep tomcat
tomcat 0:off 1:off 2:on 3:on 4:on 5:on 6:off
列出 /etc/rc.d/rcx.d/ 底下關於 tomcat 的部分
# find /etc/rc.d/ | grep 'tomcat'|sort
改httpd的port
# vi /etc/httpd/conf
Listen 8000
訂閱:
張貼留言 (Atom)
COVID-19 確診經歷紀實
原本以為真的是天選之人,就算先前家裡兩個小孩都確診都逃過了(可能有中獎但無症狀吧),不過就在2023年六月18日破解自認為天選之人的"心態",為什麼可以確認就是這天中獎的呢?因為在前都是居家上班,到人多的室內場所都會戴口罩,就剛好這天傍晚原本只想說要去附近的國...
-
在過一段時間後會出現如上錯誤訊息,這是因為MySQL已經切斷閒置的連線,所以可以利用connection pool的配置來處理這個問題。 Mysql服務器預設的「wait_timeout」是8小時(待查證), 所以mysql配置中my.ini 的wait_timeout值一定要大...
-
public class ClientTest { private static final int PORT = 8009; private static final int TIMEOUT = 2000; Server server; ...
-
當物件的屬性是null時預設是會顯示null,如下 {"status":"1","singers":["Jolin","Jolinnnnn"], "songs...
沒有留言:
張貼留言