建立一個測試用的資料庫mysql -u root -p#設定一下許可權,方便在備份時使用set password for 'root'@'localhost' =password('dsideal');flush privileges;#刪除舊的測試資料庫drop database test;#建立新的測試資料庫create database test;use test;create table test (id int); insert into test values(1);insert
原文地址:http://www.ondev.net/post/show/669 選擇需要安裝的軟體包,這裡因為我們只需要安裝伺服器,所以只選擇“Server”就可以。同時要把“Packages from CentOS Extras”的選擇框去掉。之後選擇“Customize Now”,然後選擇Next。現在需要定製軟體包,這裡選擇Editors, Text-based Internet, Development Libraries, Development Tools, DNS Name
wget http://nchc.dl.sourceforge.net/sourceforge/awstats/awstats-6.9.tar.gztar zxvf awstats-6.9.tar.gzmv awstats-6.9/ /usr/local/cd /usr/local/awstats-6.9/tools/./awstats_configure.pl Do you want to continue setup from this NON standard directory [yN]
兩種方法,第二種方法經驗證更為簡單In this short post I will show you how you can quickly add a range of IPs on anyRedHat based system (Rhel, Centos, Fedora, etc). When you have to add many IPs to a system this can be quite handy and save a lot of time.Normally when
vi /etc/sysconfig/network-scripts/ifcfg-eth0DEVICE="eth0"HWADDR="08:00:27:BE:80:A6"NM_CONTROLLED="yes"ONBOOT="yes"BOOTPROTO="dhcp" BOOTPROTO:設定網卡獲得ip地址的方式,可能的選項為static,dhcp或bootp,分別對應靜態指定的ip地址,通過dhcp協議獲得的ip地址,通過bootp協議獲得的ip地址。 service network
在我們使用CentOS系統的時候,CentOS防火牆有時是需要改變設定的。CentOS防火牆預設是開啟的,設定CentOS防火牆開放連接埠方法如下:開啟iptables的設定檔:vi /etc/sysconfig/iptables修改CentOS防火牆時注意:一定要給自己留好後路,留VNC一個管理連接埠和SSh的管理連接埠下面是一個iptables的樣本:# Firewall configuration written by system-config-securitylevel#
問題描述 在CentOS系統中採用Apache伺服器安裝GBK編碼的程式出現亂碼,這主要是因為預設安裝的Apache伺服器字元編碼為UTF-8,如果GBK程式中沒有強制編碼將產生亂碼。解決方案:1、開啟Apache設定檔httpd.conf,如預設情況下為 /etc/httpd/conf/httpd.conf# vi /etc/httpd/conf/httpd.conf2、找到AddDefaultCharset配置項AddDefaultCharset