Wednesday, November 23, 2011

āļ§ิāļ˜ีāļāļēāļĢ āļ•ิāļ”āļ•ั้āļ‡ kloxo version āđƒāļŦāļĄ่ 11/2011

 āļ§ิāļ˜ีāļāļēāļĢ āļ•ิāļ”āļ•ั้āļ‡ kloxo  version āđƒāļŦāļĄ่  11/2011

# su - root

# setenforce 0

# yum install -y wget

# wget http://download.lxcenter.org/download/kloxo/production/kloxo-installer.sh

# chmod 755 kloxo-installer.sh

# sh ./kloxo-installer.sh master



===============================
āđ€āļĄื่āļ­ āļ่āļ­āļ™

# su - root

# setenforce 0

# yum install -y wget

# wget http://download.lxcenter.org/download/kloxo/production/kloxo-install-master.sh

# sh ./kloxo-install-master.sh

Friday, September 30, 2011

kloxo Assigning a Dedicated IP address to your Site

Other Useful Features

Kloxo has many other features that are very useful. Some of the more common and frequently used features are explained below and include assigning a site a dedicated IP address, setting up and SSL certificate, using the "Files" tab and a brief discussion of clients and resellers you can create on your VPS.
NOTE: Your VPS has one IP address assigned to it by default. This is the IP address referenced in your welcome e-mail. If your VPS plan includes more than one IP address you can request additional IP addresses through our ticket system: http://my.a2hosting.com
Please provide the reason for needing the additional IP address in your ticket. We keep documentation on all IP requests to prevent usage that is against our Terms of Service. If you have used all of your available IP you can request additional IP address through the ticket system. Current pricing is $3 per IP per month but is subject to change.

Assigning a Dedicated IP address to your Site

To assign a dedicated IP address to your site, log into Kloxo. From the Home screen click the "Ipaddresses" icon in the "Resources" box.

After clicking on the icon you will be taken to a screen that lists all IP addresses assigned to your VPS. Click on the IP address you wish to assign to a particular domain. You will then be taken to the options screen for that IP address.

Click the "Configure Domain" tab at the top of the page. You will then be presented with something like the following:

Use the drop-down menu to select the domain you wish to assign to the IP address listed in the box above then click "Update".
NOTE: If you have not yet updated DNS for your domain you will receive an error message like the following:
Alert: To map an IP to a domain, the domain must ping to the same IP, otherwise, the domain will stop working. The domain you are trying to map this IP to, doesn't resolve back to the IP, and so it cannot be set as the default domain for the IP.
If you would like to assign your site a dedicated IP BEFORE you update DNS you can do so by adding the following line to /etc/hosts
'192.168.1.1 domain.tld'
You can either edit the file directly or issue a command such as the following:
'echo "192.168.1.1 domain.tld" >> /etc/hosts'
(make sure you use two ">>" or you will overwrite the file.)
In both examples remove the single quotes around the outside and replace the '192.168.1.1' with the IP address you want to assign and "domain.tld" with your domain name.
After you have made this change you can go back and follow the steps for adding the dedicated IP address listed above and you should not receive the error. You cannot assign a dedicated IP address to more than one site. If you do not assign a site a dedicated IP address it will "share" the main IP address on the server by means of virtual hosts in your webserver software (apache/lighttpd). These will be configured automatically by Kloxo.

Installing an SSL Certificate

Through Kloxo you can install an SSL certificate you have already purchased, create a self- signed certificate for personal use or generate a "CSR" (certificate signing request) for ordering a new certificate.
NOTE: In order to install an SSL certificate on a domain it MUST have a dedicated IP address. Only one SSL certificate can be installed per IP address.
Log into Kloxo and go to the Home screen. In the "Resources" box click the SSL Certificates icon.

  1. Uploading a Current SSL Certificate
    1. If you already have an SSL certificate you would like to use click the "Add Upload File" tab. Give the SSL certificate a name; this can be anything you like. Click the "Browse" buttons and upload the Key, Certificate, and CA file (if applicable) then click "Add"
    2. Now click the "SSL Certificates" tab and you should see the SSL certificate you just uploaded in the list.
    3. Assign the domain you wish to configure a dedicated IP address (see instructions above)
    4. Click the "Home" tab then click the "Ipaddresses" icon in the 'Resources' box.
    5. Click the IP address you assigned to the domain you are installing the SSL certificate on then click the "SSL Configuration Home" tab.
    6. Using the drop-down menu select the name of the SSL certificate you uploaded previously then click "Update"
    7. Kloxo should restart Apache (or lighttpd) automatically but if https:// isn't working properly you may need to restart it manually.
  2. Generating a self-signed SSL certificate
    1. Log into Kloxo and go to the Home screen. In the "Resources" box click the SSL Certificates icon.
    2. Click the "Add SSL Certificate" tab
    3. Give the SSL certificate a name and fill in the appropriate information in the boxes. Please keep in mind that an ssl certificate for "www.domain.com" is different from just "domain.com" so be sure to specify version of your domain you want the SSL certificate on. Click the "Add" button once you have filled in the appropriate information.
    4. Assign the domain you wish to configure a dedicated IP address (see instructions above)
    5. Click the "Home" tab then click the "Ipaddresses" icon in the 'Resources' box.
    6. Click the IP address you assigned to the domain you are installing the SSL certificate on then click the "SSL Configuration Home" tab.
    7. Using the drop-down menu select the name of the SSL certificate you uploaded previously then click "Update"
    8. Kloxo should restart Apache (or lighttpd) automatically but if https:// isn't working properly you may need to restart it manually.
  3. Generating a CSR to order a new SSL certificate from a certificate authority
    1. You can purchase SSL certificates through A2 Hosting. To view current offerings please see http://www.a2hosting.com/services/ssl-hosting You can submit a ticket to our billing department to order an SSL certificate.
    2. If you just need a CSR for use with an outside provider, log into Kloxo and go to the Home screen. In the "Resources" box click the SSL Certificates icon.
    3. Click the "Add SSL Certificate" tab
    4. Give the SSL certificate a name and fill in the appropriate information in the boxes. Please keep in mind that an ssl certificate for "www.domain.com" is different from just "domain.com" so be sure to specify version of your domain you want the SSL certificate on. Click the "Add" button once you have filled in the appropriate information.
    5. Click on the "SSL Certificates" tab then click on the name of the SSL certificate you just created.
    6. The CSR will be listed in the middle of the screen. You can copy and paste the CSR (be sure to include the ----- BEGIN ----- and -----END----- lines) into your outside providers request form.

The "Files" Tab

You can use the "Files" tab as an alternative to FTP or SFTP to upload or download files to/from your site. You can also zip files or folders for smaller download, upload files from your home computer, a remote URL, or remote FTP server (the last 2 are great for transferring your data from your old hosting account).
The files tab does not require much explanation. Just click on the "Files" tab and use the File Manager tab to navigate your files then view/download current files or use the Upload tab to add files to your site. All uploaded files will be placed in "/home/admin"

Clients and Resellers

There are two types of clients; Resellers and customers. The main difference is Resellers can have customers under them. The smallest unit of authorization in Kloxo is a customer, who can have multiple domains under them.
In order to setup a Reseller or Client you will need to create a Resource Plan. A resource plan determines how many clients a reseller can have, how many domains can be hosted, traffic allowed, disk space allowed and much more.
If you are hosing multiple sites for different clients and wish to give them access to their content you can add a client login so they can modify their web content but no one else's.
The home directory of a customer is '/home/clientname', and his domain's document root is /home/clientname/domain.com'. He can also login through ftp using his clientname as the id and the password.

Tuesday, September 13, 2011

āļ§ิāļ˜ีāļāļēāļĢāđƒāļŠ้āļ‡āļēāļ™ date selector āļ”้āļ§āļĒ PopCalendarXP āđ€āļžื่āļ­āļĢāļ­āļ‡āļĢัāļšāļัāļšāļ§ัāļ™āļ—ี่ MySQL


PopCalendarXP āđ€āļ›็āļ™āļ‚āļ­āļ‡āļŸāļĢีāļ­ีāļāđāļĨ้āļ§āļ„āļĢัāļš āļœāļĄāđ€āļ­āļēāļĄāļēāđƒāļŠ้āļัāļšāđ‚āļ„้āļ” php āļ‹ึ่āļ‡āđ€āļ›āļĨี่āļĒāļ™āđƒāļŦ้āđ€āļ›็āļ™āļ āļēāļĐāļēāđ„āļ—āļĒāđ€āļĢีāļĒāļšāļĢ้āļ­āļĒāđāļĨ้āļ§ āđ€āļŦāļĨืāļ­āđāļ•่āļ›ีāļ—ี่āļĒัāļ‡āđ€āļ›็āļ™āļ„āļĢิāļŠāļĻัāļāļĢāļēāļŠ āļ­āļĒู่ āļ—āļģāđ€āļ›็āļ™āļ›ีāđ„āļ—āļĒāđ„āļĄ่āđ€āļ›็āļ™āđāļ•่āļ็āļžāļ­āđƒāļŠ้āļ‡āļēāļ™āđ„āļ”้āļ„āļĢัāļš āđƒāļ„āļĢāļŠāļ™āđƒāļˆāļĢāļēāļĒāļĨāļ°āđ€āļ­ีāļĒāļ”āđ€āļžิ่āļĄāđ€āļ•ิāļĄāļ็āđ€āļ§āļ›āļ™ี้āđ€āļĨāļĒ www.calendarxp.net/

āļ§ิāļ˜ีāđƒāļŠ้āļ™่āļ°āļ„āļĢัāļš
  • unzip āđ„āļŸāļĨ์āļ­āļ­āļāļĄāļēāđāļĨ้āļ§āđ„āļ›āļ§āļēāļ‡āđƒāļ™āđ€āļ§āļ›path āļ‚āļ­āļ‡ server āđ€āļŠ่āļ™ āļ‚āļ­āļ‡āļœāļĄāļ§āļēāļ‡āđ„āļ§้āļ—ี่
    C:\AppServ\www\date1\

  • āđƒāļ™ āđ‚āļŸāļĨāđ€āļ”āļ­āļĢ์ date1 āļœāļĄāļˆāļ°āļŠāļĢ้āļēāļ‡āđ„āļ§้ āļŠāļ­āļ‡āđ„āļŸāļĨ์āđ„āļ§้ test āļ™่āļ°āļ„āļĢัāļšāļ„ืāļ­ date01.php āđāļĨāļ° date02.php āļ‹ึ่āļ‡āļŠāļ­āļ‡āđ„āļŸāļĨ์āļ™ี้āļ็āđƒāļŠ้ dreamweaver āļŠāļĢ้āļēāļ‡āļĄāļēāļ„āļĢัāļšāļ‡่āļēāļĒāļ”ีāđāļĨāļ°āļˆāļ°āļĄีāđ‚āļŸāļĨāđ€āļ”āļ­āļĢ์ PopCalendarXP āļ‹ึ่āļ‡āđ€āļ›็āļ™āđ„āļŸāļĨ์āļ—ี่āļœāļĄāđ‚āļŦāļĨāļ”āļĄāļēāđāļĨāļ°āđāļ้āđ€āļ›็āļ™āļ āļēāļĐāļēāđ„āļ—āļĒāđ€āļĢีāļĒāļšāļĢ้āļ­āļĒāđāļĨ้āļ§
  • āļĨāļ­āļ‡āļĢัāļ™āļ•āļēāļĄāļ™ี้āļ™่āļ°āļ„āļĢัāļš http://localhost/date1/date01.php
  • āļ‹ึ่āļ‡āļ§ิāļ˜ีāļāļēāļĢ install āļœāļĄāļ‚āļ­āļŠāļĢุāļ›āļ„āļĢ่āļēāļ§āđ†āļ”ัāļ‡āļ™ี้āļ™่āļ°āļ„āļĢัāļš
  1. āļŠāļĢ้āļēāļ‡ form āļ‚ึ้āļ™āļĄāļēāđāļĨāļ°āļŠāļĄāļĄุāļ•ิāļ•ั้āļ‡āļŠื่āļ­ form āđ€āļ›็āļ™ testform
  2. āļŠāļĢ้āļēāļ‡ text field āļ‚ึ้āļ™āļĄāļēāđāļĨāļ°āļŠāļĄāļĄุāļ•ิāļ•ั้āļ‡āļŠื่āļ­āļ§่āļē dc
  3. āđƒāļŦ้āļ™āļģāđ‚āļ„้āļ”āļ™ี้āļ§āļēāļ‡āđ„āļ§้āļŦāļĨัāļ‡āļ„āļģāļŠั่āļ‡ text field
    <a href="javascript:void(0)" onclick="if(self.gfPop)gfPop.fPopCalendar(document.testform.dc);return false;" ><img class="PopcalTrigger" align="absmiddle" src="PopCalendarXP/calbtn.gif" width="34" height="22" border="0" alt=""></a> 
    
    

  4. āļŠัāļ‡āđ€āļāļ•āđƒāļ™āđ‚āļ„้āļ”āļ•āļĢāļ‡ (document.testform.dc) āļˆāļ°āđ€āļŦ็āļ™āļ§่āļē form_name.textfield_name āļˆāļ°āļ•้āļ­āļ‡āđ€āļŦāļĄืāļ­āļ™āļัāļ™āļัāļšāļ—ี่āđ€āļĢāļēāļ•ั้āļ‡āđ„āļ§้āļ™่āļ°āļ„āļĢัāļšāļ‹ึ่āļ‡āļŦāļēāļāđ€āļĢāļēāļ•้āļ­āļ‡āļāļēāļĢāđƒāļŠ้āļ‡āļēāļ™ selector āļŦāļĨāļēāļĒāļ•ัāļ§āđƒāļ™ form āđ€āļ”ีāļĒāļ§āļัāļ™āđ€āļĢāļēāļ็āđāļ„่āđ€āļ›āļĨี่āļĒāļ™āđ€āļ‰āļžāļēāļ°āļŠื่āļ­ text field āđƒāļŦ้āļ•่āļēāļ‡āļัāļ™āļ็āļžāļ­āļ„āļĢัāļšāļ‹ึ่āļ‡āđƒāļ™āđ‚āļ„้āļ” date01.php āļœāļĄāļˆāļ°āđƒāļŠ้āđ€āļ›็āļ™ (document.testform.dc)āđāļĨāļ° (document.testform.dc1)āđ€āļžื่āļ­āđƒāļŠ้āļ•ัāļ§ selector āļŠāļ­āļ‡āļ•ัāļ§
  5. āļĨืāļĄāļ‚ั้āļ™āļ•āļ­āļ™āļŠุāļ”āļ—้āļēāļĒāļ็āļ•้āļ­āļ‡āđ€āļ­āļēāđ‚āļ„้āļ”āļ‚้āļēāļ‡āļĨ่āļēāļ‡āļ™ี้āļ™่āļ°āļ„āļĢัāļšāđ„āļ›āļ§āļēāļ‡āđ„āļ§้āļ่āļ­āļ™tag </body> āļ™āļ°āļ„āļĢัāļš
    <!--  PopCalendar(tag name and id must match) Tags should not be enclosed in tags other than the html body tag. -->
    <iframe width=174 height=189 name="gToday:normal:agenda.js" id="gToday:normal:agenda.js" src="PopCalendarXP/ipopeng.htm" scrolling="no" frameborder="0" style="visibility:visible; z-index:999; position:absolute; top:-500px; left:-500px;">
    </iframe>
    

āļ‹ึ่āļ‡āđ€āļ—่āļēāļ™ี้āđ€āļĢāļēāļ็āļˆāļ°āđ„āļ”้āļāļēāļĢāļŠ่āļ‡āļ„่āļēāļ§ัāļ™āļ—ี่āđ„āļ›āđ€āļ็āļšāļĨāļ‡āđƒāļ™āļāļēāļ™āļ‚้āļ­āļĄูāļĨāđāļšāļšdefault āļ‚āļ­āļ‡MySQL āđ€āļĢีāļĒāļšāļĢ้āļ­āļĒāļ„āļĢัāļš
āđ‚āļŦāļĨāļ”āđ‚āļ„้āļ”āļ—ั้āļ‡āļŦāļĄāļ”āđ„āļ”้āļ—ี่āļ™ี่āļ„āļĢัāļš date1.zip

Fusionchart+PHP+MySQL āđāļšāļšāļ—ีāļĨāļ° Step āļ„ัāļš

āļ§ิāļ˜ีāļāļēāļĢāđāļŠāļ”āļ‡āļāļĢāļēāļŸ Fusionchart v.3 āđ‚āļ”āļĒāļ”ึāļ‡āļ‚้āļ­āļĄูāļĨāļĄāļēāļˆāļēāļāļāļēāļ™āļ‚้āļ­āļĄูāļĨ MySQL āđ‚āļ”āļĒāđƒāļŠ้āļ āļēāļĐāļē PHP āļ„āļĢัāļš

step1. āđ€āļĢิ่āļĄāļˆāļēāļāļŠāļĢ้āļēāļ‡āļāļēāļ™āļ‚้āļ­āļĄูāļĨāļ—ี่āļŠื่āļ­ fusion-test [Download] āđāļĨāļ°āļŠāļĢ้āļēāļ‡āļ•āļēāļĢāļēāļ‡āļ—ี่āļŠื่āļ­ data1 āđāļĨāļ°āđ€āļžิ่āļĄāļ‚้āļ­āļĄูāļĨāļĨāļ‡āđ„āļ›āļ•āļēāļĄāļĢูāļ›āļ„āļĢัāļš


step2. āđ‚āļŦāļĨāļ”āļāļĢāļēāļŸ [download] āđāļĨāļ° unzip āđ„āļ§้āđƒāļ™āđ€āļ§āļ› root āđ‚āļ”āļĒāļ‚āļ­āļ‡āļœāļĄāļˆāļ°āđ€āļ็āļšāđ„āļ§้āļ—ี่āļ™ี่ C:\AppServ\www\FusionCharts_Evaluation\ āļˆāļēāļāļ™ั้āļ™āļ็āļĨāļ­āļ‡āđ€āļĢีāļĒāļāļ”ูāđ€āļĨāļĒāļ„āļĢัāļšāļ•āļēāļĄ path āļ™ี้
http://localhost/FusionCharts_Evaluation/Code/PHP/DBExample/Default.php
āļ–้āļēāļĢัāļ™āđ„āļ”้āđāļšāļšāļ™ี้āļ็āđ‚āļ­āđ€āļ„āđāļĨ้āļ§āļ„āļĢัāļš


āļŦāļĄāļēāļĒ āđ€āļŦāļ•ุ āļāļĢāļēāļŸāļ—ี่āļœāļĄāđƒāļŦ้āđ‚āļŦāļĨāļ”āđ€āļ›็āļ™āļ•ัāļ§āļ—ี่āļœāļĄāļ•ัāļ”āļšāļēāļ‡āļŠ่āļ§āļ™āļ­āļ­āļāđ€āļ­āļēāđ€āļ‰āļžāļēāļ°āđ„āļŸāļĨ์āļ—ี่āđ€āļี่āļĒāļ§āļ‚้āļ­āļ‡āđ€āļ—่āļē āļ™ั้āļ™āđāļĨāļ°āđāļ้āđ„āļ‚āđ€āļĢีāļĒāļšāļĢ้āļ­āļĒāđāļĨ้āļ§āļ™่āļ°āļ„āļĢัāļšāđ‚āļ”āļĒāđƒāļ„āļĢāļ­āļĒāļēāļāđ‚āļŦāļĨāļ”āđ€āļ­āļēāđ„āļŸāļĨ์āļ—ั้āļ‡āļŦāļĄāļ”āļ—ุāļāļ āļēāļĐāļē āļŠāļēāļĄāļēāļĢāļ–āđ‚āļŦāļĨāļ”āđ„āļ”้āļ—ี่āđ€āļ§āļ›āļ™ี้ www.fusioncharts.com

āđ‚āļ”āļĒāļāļĢāļēāļŸāļ—ี่āļœāļĄāļ•้āļ­āļ‡āļāļēāļĢāđāļŠāļ”āļ‡āļ„ืāļ­ āđāļŠāļ”āļ‡āļˆāļģāļ™āļ§āļ™āļ—ี่āđ€āļŦāļĨืāļ­āļ‚āļ­āļ‡āļŠิāļ™āļ„้āļēāđāļ•่āļĨāļ°āļ›āļĢāļ°āđ€āļ āļ—
āđ„āļŸāļĨ์āļ—ี่āļœāļĄāđāļ้āđ„āļ‚āļĄีāļ•āļēāļĄāļ™ี้āļ„āļĢัāļš
1.āđ„āļ›āļ—ี่ C:\AppServ\www\FusionCharts_Evaluation\Code\PHP\Includes āđāļ้āđ„āļŸāļĨ์ DBConn.php āļ•āļēāļĄāļ™ี้
$hostdb = 'localhost';   // MySQl host
    $userdb = 'root';    // MySQL username
    $passdb = 'Your-Password';    // MySQL password āļ–้āļēāđ„āļĄ่āļĄีāļ็āđƒāļŠ่ ''
    $namedb = 'fusion-test'; // MySQL database name


2.āđ„āļ›āļ—ี่ C:\AppServ\www\FusionCharts_Evaluation\Code\PHP\DBExample āđāļ้āđ„āļŸāļĨ์ Default.php āļ•āļēāļĄāļ™ี้
$strQuery = "select distinct(type) as type_name , sum(amount) as count_amt from data1 group by type_name";

            $strXML .= "<set label='" . $ors2['type_name'] . "' value='" . $ors2['count_amt'] . "' />";


āđāļĨāļ°āļŦāļēāļāļ•้āļ­āļ‡āļāļēāļĢāđ€āļ›āļĨี่āļĒāļ™āļāļĢāļēāļŸāđāļ—่āļ‡āļ็āđāļ„่āđāļ้āļ•āļĢāļ‡āļ„āļģāļŠั่āļ‡ āđ€āļ›āļĨี่āļĒāļ™āļˆāļēāļ Pie3D.swf āđ€āļ›็āļ™ Column3D.swf āļ•āļēāļĄāļ™ี้
echo renderChart("../../FusionCharts/Column3D.swf", "", $strXML, "FactorySum", 600, 300, false, false);



āļ—ี่āļ•้āļ­āļ‡āđāļ้āļŦāļĨัāļāđ†āļ็āļĄีāđāļ„่āļ™ี้āļ„āļĢัāļš āļ„ืāļ­ query āļ„āļģāļŠั่āļ‡āđƒāļŦāļĄ่ āđāļĨ้āļ§āļ็ set āļ„่āļē label āđ€āļžื่āļ­āļŠ่āļ‡āļ„่āļē xml āđƒāļŦ้āļ•āļĢāļ‡āļัāļš query āđ„āļ›āļĒัāļ‡āļ•ัāļ§āļāļĢāļēāļŸ
āđ€āļŠāļĢ็āļˆāđāļĨ้āļ§āļ„๊āļēāļš āļ‡่āļēāļĒāļ›่āļēāļ§ āļ­ิāļ­ิ

Kloxo error "Some of Horde's configuration files are missing or unreadable conf.php"

Kloxo error "Some of Horde's configuration files are missing or unreadable conf.php"

āļ§ัāļ™āļ™ี้āļ•ิāļ”āļ•ั้āļ‡ kloxo āđƒāļŦāļĄ่ āļ›āļĢāļēāļāļāļ§่āļē webmail āļ—ั้āļ‡ Horde āđāļĨāļ° RoundCube āđƒāļŠ้āđ„āļĄ่āđ„āļ”้ āļ‚ึ้āļ™ error āļ—ั้āļ‡āļ„ู่

Error āļ‚āļ­āļ‡ Horde
"Some of Horde's configuration files are missing or unreadable conf.php"

āļĨāļ­āļ‡āļ„้āļ™āļŦāļēāļ§ิāļ˜ีāđāļ้āđ„āļ‚āđƒāļ™ LxCenter āļžāļšāļ—āļēāļ‡āđāļ้āļ—ี่āđ„āļ”้āļœāļĨāļ„ืāļ­āđƒāļŠ้āļ„āļģāļŠั่āļ‡

chmod 644 /home/kloxo/httpd/webmail/horde/config/conf.php

āļ›ัāļāļŦāļēāļ„ืāļ­āđ„āļŸāļĨ์ conf.php āđ„āļ”้āđ€āļ›āļĨี่āļĒāļ™ Permission āđ€āļ›็āļ™ 600 āļ—āļģāđƒāļŦ้āđƒāļŠ้āļ‡āļēāļ™āđ„āļĄ่āđ„āļ”้

Error āļ‚āļ­āļ‡ RoundCube
Roundcube had "Configuration Error: db.inc.php"

āļ›ัāļāļŦāļēāđ€āļิāļ”āļ‚ึ้āļ™āļ­āļĒ่āļēāļ‡āđ€āļ”ีāļĒāļ§āļัāļ™āļ„ืāļ­ Permission āļ‚āļ­āļ‡ db.inc.php āđ€āļ›็āļ™ 600
āļ—āļēāļ‡āđāļ้āļ็āđƒāļŠ้ putty āđ€āļ‚้āļēāđ„āļ›āđƒāļŠ้āļ„āļģāļŠั่āļ‡

chmod 644 /home/kloxo/httpd/webmail/roundcube/config/db.inc.php

āļ§ิāļ˜ีāļ•ิāļ”āļ•ั้āļ‡ MTRG āļšāļ™ Kloxo

āđ€āļ›็āļ™āļŦāļ™ึ่āļ‡āđƒāļ™āđ€āļ—āļ„āļ™ิāļ„āļ—ี่āļœāļĄāļ™āļģāļĄāļēāđ€āļžิ่āļĄāļ„āļ§āļēāļĄāļŠāļēāļĄāļēāļĢāļ–āđƒāļŦ้āđāļ่ VPS(Linux) āļ—ี่āđƒāļŠ้ Control Panel Kloxo Lxadmin
āļ‹ึ่āļ‡ āļ–้āļē VPS āļ—ี่āđ€āļĢāļēāđ€āļŠ่āļēāļĄāļēāđ€āļ›็āļ™āđāļšāļšāđ„āļĄ่āļĄี Control Panel āļŠāļģāļŦāļĢัāļšāļ”ู Status āļ•่āļēāļ‡āđ†āļ‚āļ­āļ‡ VPS  āļĄัāļ™āļ็āđ€āļ›็āļ™āđ€āļĢื่āļ­āļ‡āļĨāļģāļšāļēāļāļžāļ­āļŠāļĄāļ„āļ§āļĢ āļ—ี่āđ€āļĢāļēāļˆāļ°āđ€āļŠ็āļ„āļ§่āļē VPS āļŦāļĢืāļ­ Server āļ‚āļ­āļ‡āđ€āļĢāļē āđƒāļŠ้āļ‡āļēāļ™ CPU, RAM, Traffic , Connections āđ„āļ›āļĄāļēāļāļ™้āļ­āļĒāđāļ„่āđ„āļŦāļ™

āļˆāļĢิāļ‡āđāļĨ้āļ§āđ† āļĄีāđ‚āļ›āļĢāđāļāļĢāļĄāļ­ื่āļ™āđ†āļ—ี่āļ™ิāļĒāļĄāđƒāļŠ้āļัāļ™āļ­ีāļāļ™āļ­āļāļˆāļēāļ MRTG āļ­āļĒ่āļēāļ‡ Munin āļ็āđāļŠāļ”āļ‡āļœāļĨāđ„āļ”้āļĨāļ°āđ€āļ­ีāļĒāļ”āļ”ีāđ€āļŦāļĄืāļ­āļ™āļัāļ™

āļ่āļ­āļ™āļ­ื่āļ™āļ็āđ€āļ‚้āļē Shell āļ่āļ­āļ™āļ™āļ°āļ„āļĢัāļš āđāļĨ้āļ§āļ๊āļ­āļšāļ„āļģāļŠั่āļ‡āđ„āļ›āđƒāļŠ้āļ‡āļēāļ™āđ„āļ”้āđ€āļĨāļĒāļ„āļĢัāļš

- āļ•ิāļ”āļ•ั้āļ‡ mrtg āļ่āļ­āļ™
yum -y install net-snmp net-snmp-utils mrtg
cd /etc/snmp/
mv snmpd.conf snmpd.conf.bak
nano snmpd.conf


- āđāļ้āđ„āļ‚ Config āđ‚āļ”āļĒāļāļēāļĢāļ๊āļ­āļšāļ‚้āļēāļ‡āļĨ่āļēāļ‡āđ„āļ›āļ§āļēāļ‡āđƒāļ™ text editor āđ€āļĨāļĒāļ„āļĢัāļš
syslocation  Thailand
syscontact  admin
sysservices 79
rocommunity  snmp 127.0.0.1
agentaddress  127.0.0.1


chkconfig snmpd on
/etc/init.d/snmpd start


- āļŠāļĢ้āļēāļ‡ Directory āļ—ี่āđƒāļŠ้āđƒāļ™āļāļēāļĢāļ—āļģāļ‡āļēāļ™āļ‚āļ­āļ‡ mrtg
mkdir -p /home/kloxo/httpd/default/mrtg
cd /etc/mrtg/


- āđāļ้āđ„āļ‚ Config āļ‚āļ­āļ‡ mrtg
mv mrtg.cfg mrtg.cfg.bak
nano mrtg.cfg


- āļ„āļģāđ‚āļ„้āļ”āđ„āļŸāļĨ์āļāļēāļĢāļ•ั้āļ‡āļ„่āļēāđ„āļ›āđƒāļŠ่āđƒāļ™ text editor
LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt,/usr/share/snmp/mibs/TCP-MIB.txt,/usr/share/snmp/mibs/UDP-MIB.txt
WorkDir: /home/kloxo/httpd/default/mrtg
Options[_]: growright
EnableIPv6: no
Target[server.traffic]: 2:snmp@127.0.0.1:::::2
SetEnv[server.traffic]: MRTG_INT_IP="eth0" MRTG_INT_DESCR="eth0"
MaxBytes[server.traffic]: 125000000
Title[server.traffic]: Traffic Load
PageTop[server.traffic]: <h1>Traffic Load</h1>
Options[server.traffic]: growright, bits

#
# Memory Monitoring (Free with Buffer,/Cache/Total)
#
Target[server.memory]: memTotalSwap.0&memAvailReal.0:snmp@127.0.0.1 + PseudoZero&memBuffer.0:snmp@127.0.0.1 - memAvailSwap.0&PseudoZero:snmp@127.0.0.1
Title[server.memory]: Free Memory
PageTop[server.memory]: <H1>Free Memory</H1>
MaxBytes[server.memory]: 1044480000
ShortLegend[server.memory]: KBytes
YLegend[server.memory]: KBytes
LegendI[server.memory]: Swap inused
LegendO[server.memory]: Free Memory
Legend1[server.memory]: Swap inused
Legend2[server.memory]: Free memory inc Buffer
Options[server.memory]: growright,gauge,nopercent
#kMG[server.memory]: k,M,G

#
# CPU Monitoring
# (Scaled so that the sum of all three values doesn't exceed 100)
#
 
Target[server.cpu]: ssCpuRawUser.0&ssCpuUser.0:snmp@127.0.0.1 + ssCpuRawSystem.0&ssCpuSystem.0:snmp@127.0.0.1
Title[server.cpu]: Server CPU Load
PageTop[server.cpu]: <H1>CPU Utilization</H1>
MaxBytes[server.cpu]: 100
ShortLegend[server.cpu]: %
YLegend[server.cpu]: % CPU#Legend1[server.cpu]: Current CPU Idle
Legend1[server.cpu]: Accurate CPU Load
Legend2[server.cpu]: Current CPU Load
#LegendI[server.cpu]: Percentage CPU Idle
LegendI[server.cpu]: Accurate CPU Load
LegendO[server.cpu]: Current CPU Load
Options[server.cpu]: growright,nopercent,gaugeUnscaled[server.cpu]: ymwd
 #
# Load Average 1 & 15 min
# (Scaled so that the sum of all three values doesn't exceed 100)
#
Target[server.load]: laLoadInt.3&laLoadInt.1:snmp@127.0.0.1
Title[server.load]: Load Average at 15 and 1 Min
PageTop[server.load]: <H1>Load Average</H1>
MaxBytes[server.load]: 10000
ShortLegend[server.load]: #
YLegend[server.load]: #Load
Legend1[server.load]: Current CPU load (15 Mins)
Legend2[server.load]: Current CPU load (1 Mins)
LegendI[server.load]: Load 15 Mins
LegendO[server.load]: Load 1 Mins
Options[server.load]: growright,nopercent,gauge

#
# New TCP Connection Monitoring (per minute)
#
 
Target[server.newconns]: tcpPassiveOpens.0&tcpActiveOpens.0:snmp@127.0.0.1
Title[server.newconns]: Newly Created TCP Connections
PageTop[server.newconns]: <H1>New TCP Connections</H1>
MaxBytes[server.newconns]: 65536
ShortLegend[server.newconns]: c/sYLegend[server.newconns]: Conns / Min
LegendI[server.newconns]: In
LegendO[server.newconns]: Out
Legend1[server.newconns]: New inbound connectionsLegend2[server.newconns]: New outbound connectionsOptions[server.newconns]: growright,nopercent,perminute#Unscaled[server.newconns]: ymwd
#kMG[server.newconns]: k,M,G,T,P,X  
 #
# Established TCP Connections
#
 Target[server.estabcons]: tcpCurrEstab.0&tcpCurrEstab.0:snmp@127.0.0.1
Title[server.estabcons]: Currently Established TCP Connections
PageTop[server.estabcons]: <H1>Established TCP Connections</H1>
MaxBytes[server.estabcons]: 65536
ShortLegend[server.estabcons]: #
YLegend[server.estabcons]: Connections
LegendI[server.estabcons]: In/Out
LegendO[server.estabcons]: Legend1[server.estabcons]: Established connectionsLegend2[server.estabcons]: Options[server.estabcons]: growright,nopercent,gauge


- āļŠุāļ”āļ—้āļēāļĒ
indexmaker --columns=2 --output=/home/kloxo/httpd/default/mrtg/index.html /etc/mrtg/mrtg.cfg


āļāļēāļĢāđ€āļĢีāļĒāļāđƒāļŠ้āļ‡āļēāļ™ āđ€āļĢีāļĒāļāļœ่āļēāļ™ ip server/vps āļ‚āļ­āļ‡āļ„ุāļ“ http://xxx.xxx.xxx.xxx/mrtg

Posted Image


āļŦāļ§ัāļ‡āļ§่āļēāļ„āļ‡āđ€āļ›็āļ™āļ›āļĢāļ°āđ‚āļĒāļŠāļ™์āļ„āļĢัāļš

āļ›ัāļāļŦāļēāļāļĢāļēāļŸ apache āđ„āļĄ่āđāļŠāļ”āļ‡āļĢูāļ›

āļ•āļ­āļ™āļ™ี้āļ•ิāļ”āļ›ัāļāļŦāļēāļāļĢāļēāļŸ apache āđ„āļĄ่āđāļŠāļ”āļ‡āļĢูāļ›āđ€āļĨāļĒāļ­่āļ°āļ„่āļ°

āļ„่āļē /etc/httpd/conf/httpd.conf āļ็āđ„āļ›āļ—āļģāļĄāļēāđāļĨ้āļ§

āļ­้āļēāļ‡āļ–ึāļ‡
LoadModule status_module modules/mod_status.so


āļ­้āļēāļ‡āļ–ึāļ‡
# Allow server status reports generated by mod_status,
# with the URL of http://servername/server-status
# Change the ".example.com" to match your domain to enable.
#
<Location /server-status>
    SetHandler server-status
#    Order deny,allow
#    Deny from all
    Allow from all
</Location>


āļ­้āļēāļ‡āļ–ึāļ‡
# ExtendedStatus controls whether Apache will generate "full" status
# information (ExtendedStatus On) or just basic information (ExtendedStatus
# Off) when the "server-status" handler is called. The default is Off.
#
ExtendedStatus On

Magic Quotes GPC āđƒāļ™ kloxo āļ„ืāļ­

āļ„ุāļ“āđ€āļ„āļĒāļŠāļ‡āļŠัāļĒāļŦāļĢืāļ­āđ„āļĄ่āļ§่āļē  Magic Quotes GPC  āļ„ืāļ­āļ­āļ°āđ„āļĢ? āđāļ้āđ„āļ‚āļ•āļĢāļ‡āđ„āļŦāļ™? āļˆāļģāđ€āļ›็āļ™āļŦāļĢืāļ­āđ„āļĄ่?
Magic Quotes GPC āļĄีāđ„āļ§้āđ€āļœื่āļ­āļŠ่āļ§āļĒāđƒāļŦ้āđ€āļĢāļēāļŠāļēāļĄāļēāļĢāļ–āļ™āļģāļ‚้āļ­āļĄูāļĨ āļŦāļĨัāļ‡āļˆāļēāļāļ—ี่āđ€āļĢāļē submit form āđ„āļ› query āđƒāļŠ่ database āđ„āļ”้āđ‚āļ”āļĒāđ„āļĄ่ error

āļ‹ึ่āļ‡āļāļēāļĢāļĢัāļšāļ‚้āļ­āļĄูāļĨāļˆāļēāļ form āļ•่āļēāļ‡āđ†  āļĄีāđ‚āļ­āļāļēāļŠāļ—ี่ user āļˆāļ°āļāļĢāļ­āļ Single quote (') āļŦāļĢืāļ­ Double quote (") āđ€āļ‚้āļēāļĄāļēāđƒāļ™āļŠ่āļ­āļ‡ input box āļ‚āļ­āļ‡āđ€āļĢāļēāđ„āļ”้
āļ”ัāļ‡āļ™ั้āļ™āļ–้āļēāđ€āļĢāļēāļ™āļģāļ‚้āļ­āļĄูāļĨāđ„āļ›āđƒāļŠ้āđ‚āļ”āļĒāļ•āļĢāļ‡āļ—āļģāđƒāļŦ้āļĄีāđ‚āļ­āļāļēāļŠ  query error āđ„āļ”้
āļ–้āļēāļŦāļēāļ   Magic Quotes GPC = On
āļˆāļ°āļĄีāļāļēāļĢāđ€āļ•ิāļĄ \ āđ€āļ‚้āļēāđ„āļ›āļ—ี่āļŦāļ™้āļē Single quote āļŦāļĢืāļ­ Double quote āđƒāļŦ้āļ­ัāļ•āđ‚āļ™āļĄัāļ•  āļ—āļģāđƒāļŦ้āļŠāļēāļĄāļēāļĢāļ–āļ™āļģāļ„่āļēāđ„āļ› query āđ„āļ”้āļ—ัāļ™āļ—ี
āļ”ัāļ‡āļ™ั้āļ™āļāļēāļĢ query āđ€āļĢāļēāļˆึāļ‡āļ•้āļ­āļ‡āđ€āļŠ็āļ„āļ”ัāļ‡āļ™ี้
01if (get_magic_quotes_gpc()) {
02    $name = stripslashes($_POST['name']);
03}
04else {
05    $name= $_POST['name'];
06}
07 
08$name= mysql_real_escape_string($name);
09 
10$sql = "INSERT INTO table_name (name) VALUES ('$name')";
āđāļ•่āļ–้āļēāļŦāļēāļāļ™āļģāđ„āļ›āđāļŠāļ”āļ‡āļœāļĨāđƒāļ™āļŠ่āļ§āļ™āļ—ี่āļŠāļ™āļัāļš Single quote āļŦāļĢืāļ­ Double quote āļ‚āļ­āļ‡ syntax āļšāļ™ html āļĨ่āļ°?
1// āļŠāļĄāļĄุāļ•ิāđƒāļŦ้  user āļāļĢāļ­āļāļ„่āļēāđ€āļ‚้āļēāļĄāļēāđ€āļ›็āļ™  "your name"
2// āļ”ัāļ‡āļ™ั้āļ™āļ–้āļēāļŦāļēāļāđ€āļĢāļēāļˆāļ°āđāļŠāļ”āļ‡āļ„่āļē your name āļ—ี่ value āļˆāļ°āđ€āļ›็āļ™āļ”ัāļ‡āļ™ี้
3<input name="name">

āđāļ™่āļ™āļ­āļ™āļ§่āļēāļāļēāļĢāđāļŠāļ”āļ‡āļœāļĨāđ€āļŠ่āļ™āļ™ี้āļœิāļ” syntax āļ‚āļ­āļ‡ html āļ”ัāļ‡āļ™ั้āļ™āđ€āļĢāļēāļˆึāļ‡āļ­āļēāļˆāđƒāļŠ้  function  htmlspecialchars  āļ‚āļ­āļ‡ php āļĄāļēāļŠ่āļ§āļĒāļ่āļ­āļ™āļ—ี่āļˆāļ°āđāļŠāļ”āļ‡āļœāļĨāļšāļ™āļ„่āļēāļ‚āļ­āļ‡ value āļˆāļ°āļ—āļģāđƒāļŦ้āļŠāļēāļĄāļēāļĢāļ–āđāļŠāļ”āļ‡āļœāļĨāļ­āļ­āļāļĄāļēāđ„āļ”้āļ–ูāļāļ•้āļ­āļ‡

āļāļēāļĢāđāļ้āđ„āļ‚ Magic Quotes GPC

āļŠāļēāļĄāļēāļĢāļ–āđāļ้āđ„āļ‚ Magic Quotes GPC āđ„āļ”้āļ—ี่ file php.ini
1# php.ini seting to trun On/Off
2magic_quotes_gpc = On

āļŦāļĢืāļ­āļŠāļēāļĄāļēāļĢāļ–āđāļ้āļ—ี่ file .htaccess āđ„āļ”้āļ”ัāļ‡āļ™ี้
1# .htaccess seting to trun On/Off
2php_flag magic_quotes_gpc off

āļ”ัāļ‡āļ™ั้āļ™āļāļēāļĢ set magic_quotes_gpc āļˆāļ°āļˆāļģāđ€āļ›็āļ™āļŦāļĢืāļ­āđ„āļĄ่āļ‚ึ้āļ™āļ­āļĒู่āļัāļš code āļ‚āļ­āļ‡āđ€āļĢāļēāđ€āļ­āļ‡āļ§่āļēāđ„āļ”้āļ„āļĢāļ­āļš mysql_real_escape_string āđ„āļ§้āļŦāļĢืāļ­āđ„āļĄ่āđ€āļžื่āļ­āļĨāļ­āļ‡āļĢัāļšāļ‚้āļ­āļĄูāļĨāļˆāļēāļ user āļ—ี่āļāļĢāļ­āļ Single quote āļŦāļĢืāļ­ Double quote āđ€āļ‚้āļēāļĄāļē

[āđāļ้]web mail āļ‚āļ­āļ‡ kloxo āđ„āļĄ่āđ€āļŠื่āļ­āļĄāļ•่āļ­ DB

[āđāļ้]web mail āļ‚āļ­āļ‡ kloxo āđ„āļĄ่āđ€āļŠื่āļ­āļĄāļ•่āļ­ DB

āļŠั่āļ‡āđƒāļ™ shell
# sh /script/fixmail
# sh /script/fixwebmail
# service kloxo restart

āļˆāļ°āļ•ิāļ”āļ•ั้āļ‡ kloxo āđāļ™āļ°āļ™āļģāđƒāļŦ้āļŠั่āļ‡āļ•āļēāļĄāļ™ี้āļ่āļ­āļ™āļ„āļĢัāļš

āļˆāļ°āļ•ิāļ”āļ•ั้āļ‡ kloxo āđāļ™āļ°āļ™āļģāđƒāļŦ้āļŠั่āļ‡āļ•āļēāļĄāļ™ี้āļ่āļ­āļ™āļ„āļĢัāļš



āļœāļĄāļĨāļ­āļ‡āļĄāļēāđāļĨ้āļ§āđ€āļ§āļĨāļēāļ•ิāļ”āļ•ั้āļ‡ kloxo āļˆāļ°āđ€āļĢ็āļ§āļāļ§่āļēāļ•āļ­āļ™āļĒัāļ‡āđ„āļĄ่āļŠั่āļ‡āļ„āļĢัāļš

   
# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*
# yum update -y
# yum groupinstall 'Development Tools' -y
# yum groupinstall 'Development Libraries' -y
# rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
# cd /tmp
# wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
# rpm -ivh rpmforge-release-0.3.6-1.el5.rf.i386.rpm
# yum install ntp httpd mysql-server php php-mysql php-mbstring php-mcrypt phpmyadmin rpm-build gcc mysql-devel openssl-devel cyrus-sasl-devel pkgconfig zlib-devel pcre-devel openldap-devel postgresql-devel expect libtool-ltdl-devel openldap-servers libtool gdbm-devel pam-devel gamin-devel -y
# yum install amavisd-new spamassassin clamav clamd unzip bzip2 unrar perl-DBD-mysql -y
# cd /etc/yum.repos.d/
# wget http://centos.karan.org/kbsingh-CentOS-Extras.repo
# yum --enablerepo=kbs-CentOS-Testing install install php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc php-eaccelerator php-mbstring php-mcrypt php-mhash php-mssql php-snmp php-soap php-tidy curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel mod_fcgid php-cli httpd-devel -y
# setenforce 0
# cd /root
# yum install -y wget
# wget http://download.lxcenter.org/download/kloxo/production/kloxo-install-master.sh
# sh ./kloxo-install-master.sh --db-rootpassword=
# reboot

āđƒāļŠ้ kloxo āļĨāļ‡ WordPress āļ•ิāļ”āļ•ั้āļ‡ plugin, theme āđāļĨ้āļ§āđ„āļĄ่ auto āđ„āļ›āļŦāļ™้āļē Active

āļˆāļēāļāļŦัāļ§āļ‚้āļ­āļ็āļžāļ­āļˆāļ°āļ™ึāļāļ āļēāļžāļ­āļ­āļāđāļĨ้āļ§āđƒāļŠ่āļĄั้āļĒāļ„āļĢัāļšāļœāļĄāļ็āđ„āļĄ่āļĢู้āļĄāļēāļ•ั้āļ‡āđāļ•่āđāļĢāļāļ„āļĢัāļšāļ§่āļēāļĄัāļ™ āđ€āļ›็āļ™āđ€āļžāļĢāļēāļ°āļ­āļ°āđ„āļĢāļ„āļĢัāļšāđāļ•่āđ€āļĄื่āļ­āļี่āđ„āļ”้āļ—āļģāđ€āļˆāļ­āļัāļšāļ›ัāļāļŦāļēāļ‚āļ­āļ‡ pure-ftpd āļ—ี่āļ•ิāļ”āļĄāļēāļัāļš kloxo āļĄัāļ™āđƒāļŠ้āđ„āļĄ่āđ„āļ”้āļ‹āļ°āļ‡ั้āļ™āđ„āļĄ่āđ€āļ„āļĒāđƒāļŠ้āļ”้āļ§āļĒāļŠิ่ āđ€āļ„āļĒāđƒāļŠ้āđāļ•่ Vsftpd āđ„āļĄ่āļĄีāļ­āļ°āđ„āļĢāļĄāļēāļāđ€āļĨāļĒāļ„āļĢัāļšāļœāļĄāđ€āļĨāļĒāļˆัāļ”āļāļēāļĢāļĨāļš pure-ftpd āđāļĨāļ°āļ•ิāļ”āļ•ั้āļ‡ Vsftpd āđāļ—āļ™āļ„āļĢัāļš āđ€āļ›็āļ™āļ—ี่āļ™่āļēāļžāļ­āđƒāļˆāļĄāļēāļ ftp āđƒāļŠ้āļ‡āļēāļ™āđ„āļ”้āļ›āļāļ•ิāļ”ีāļ„āļĢัāļš āđāļ–āļĄāđ€āļ§āļĨāļēāđ€āļĢāļēāļ•ิāļ”āļ•ั้āļ‡ plugin āļŦāļĢืāļ­ theme āļ‚āļ­āļ‡ wordpres āļ็āļĒัāļ‡āļ•ิāļ”āļ•ั้āļ‡āđ€āļŠāļĢ็āļˆāļŠāļĄāļšูāļĢāļ“āļāļ§่āļēāđ€āļ”ิāļĄāļ„āļĢัāļšāļ„ืāļ­āđ€āļĄื่āļ­āļĄัāļ™āļ­ัāļžāđ‚āļŦāļĨāļ”āđ€āļŠāļĢ็āļˆāļĄัāļ™āļ็āļˆāļ° auto āđ„āļ›āļŦāļ™้āļē Active āđ‚āļ›āļĢāđāļāļĢāļĄāđ€āļĨāļĒāđāļ•่āđ€āļĄื่āļ­āļ่āļ­āļ™āļ„้āļēāļ‡ āļ­āļĒู่āļ—ี่āļŦāļ™้āļē unpack … āļĄāļēāļ”ูāļ§ิีāļ˜ีāļāļēāļĢāļ•ิāļ”āļ•ั้āļ‡ Vsftpd āđāļ—āļ™ pure-ftpd āļัāļ™āļ„āļĢัāļš

1
2
3
4
5
6
7
8
9
# yum remove pure-ftpd -y
# yum install vsftpd -y
# cd /etc/vsftpd/
# mv vsftpd.conf vsftpd.conf_bak
# wget http://mirror.pishit.com/etc/vsftpd.conf
# touch chroot_list
# chmod 777 chroot_list
# setenforce 0
# chkconfig vsftpd on
āļˆāļēāļāļ™ั้āļ™āļŠั่āļ‡ reboot āļ„āļĢัāļš
āļ›āļĨ. āđ€āļĄื่āļ­āļ—āļģāļāļēāļĢāļ•ิāļ”āļ•ั้āļ‡ Vsftpd āļĢāļ°āļšāļšāļ‚āļ­āļ‡ kloxo āļ­āļēāļˆāđ„āļĄ่āļŠāļēāļĄāļēāļĢāļ–āļŠāļĢ้āļēāļ‡ FTP user āđ€āļžิ่āļĄāđ„āļ”้āļ™āļ°āļ„āļĢัāļš āļ•āļĢāļ‡āļ™ี้āļ่āļ­āļ™āļˆāļ°āļ•ิāļ”āļ•ั้āļ‡ Vsftpd āđƒāļŦ้āļ„ิāļ”āļ­āļĒ่āļēāļ‡āļĢāļ­āļšāļ„āļ­āļšāļ่āļ­āļ™āļ„āļĢัāļšāļ§่āļēāļ„āļ§āļĢāļ—āļģāļ•āļēāļĄāļœāļĄāļŦāļĢืāļ­āđ„āļĄ่āļ„āļĢัāļš

āļ§ิāļ˜ีāļ—āļģ Firewall āļ›้āļ­āļ‡āļัāļ™ Server āļ—ี่āđƒāļŠ้ CP āļ‚āļ­āļ‡ Kloxo

Kloxo
Kloxo
āļ§ิāļ˜ีāļ™ี้āđ€āļ­āļēāļĄāļēāļˆāļēāļāđ€āļ§็āļš lxcenter.org āļ™āļ°āļ„āļĢัāļš āđāļ•่āđ€āļŦ็āļ™āđ€āļ›็āļ™āļ āļēāļĐāļēāļ­ัāļ‡āļāļĐāļĪāļ„āļĢัāļšāđ€āļĨāļĒāļ­āļĒāļēāļāđƒāļŦ้āļĄีāđ„āļ—āļĒāļš้āļēāļ‡āļ„āļĢัāļšāļŦāļĨัāļāļāļēāļĢāļ‚āļ­āļ‡āđ€āļ„้āļēāļ็āļ„ืāļ­āđƒāļŠ้ āļ›ิāļ” IPTABLES āđ„āļ§้āļ่āļ­āļ™āļ„āļĢัāļšāđāļĨ้āļ§āļ—āļģ firewall rules āļ‚ึ้āļ™āļĄāļēāđƒāļŦāļĄ่āļ„āļĢัāļšāđāļĨ้āļ§āļ—āļģāđƒāļŦ้ firewall run āļ•āļ­āļ™ boot āļ—ุāļāļ„āļĢั้āļ‡āļ„āļĢัāļšāđ‚āļ”āļĒāļŠāļĢ้āļēāļ‡ script āđ„āļ§้āļ—ี่ /etc/init.d/ āļ„āļĢัāļš āđ€āļŦāļĄืāļ­āļ™ service āļ•ัāļ§āļŦāļ™ึ่āļ‡āđ€āļĨāļĒāļĨāļ°āļ„āļĢัāļšāļ—āļģāļ‡่āļēāļĒāļĄāļēāļāđ† āļ„āļĢัāļšāļ—ี่āļ­āļ˜ิāļšāļēāļĒāļœāļĄāļ็āļžāļ­āđ€āļ‚้āļēāđƒāļˆāđāļšāļšāļ™ี้āļ„āļĢัāļš āđ€āļ—āļžāļ—ี่āļœ่āļēāļ™āļĄāļēāđ€āļˆāļ­āļ­āļĒ่āļēāļ§่āļēāļัāļ™āļ™āļ°āļ„āļĢัāļš āļŦุāđ† āļĄāļēāļ”ูāļ§ิāļ˜ีāļัāļ™āđ€āļĨāļĒāļ„āļĢัāļš

āļ­āļĒ่āļēāļ‡āđāļĢāļāļŠั่āļ‡
āļ›ิāļ” service IPTABLES:
# /etc/init.d/iptables stop
āļāļģāļŦāļ™āļ”āđƒāļŦ้ service āđ„āļĄ่āļ•้āļ­āļ‡ run āļ•āļ­āļ™ boot (āđ€āļ”ี่āļĒāļ§āļˆāļ°āļĄีāļāļēāļĢāļŠั่āļ‡āđ€āļ­āļ‡āđƒāļ™āļ•ัāļ§ script):
# chkconfig iptables off
āļˆāļēāļāļ™ั้āļ™āļ—่āļēāļ™āļˆāļ°āđƒāļŠ้āļ„āļģāļŠั่āļ‡ touch āļŦāļĢืāļ­ vi, vim āļ­āļ°āđ„āļĢāļ็āđ„āļ”้āļ„āļĢัāļšāļŠāļĢ้āļēāļ‡āđ„āļŸāļĨ์āļŠื่āļ­ firewall āļ—ี่āļ•āļģāđāļŦāļ™่āļ‡ /etc/init.d/ āļ„āļĢัāļšāļĄāļēāļ”ูāļ—ี่āļœāļĄāļ—āļģāļ„āļĢัāļš
# vim /etc/init.d/firewall
āđ‚āļ›āļĢāđāļāļĢāļĄ Vim āļĄัāļ™āļˆāļ°āļŠāļĢ้āļēāļ‡āđ„āļŸāļĨ์āđƒāļŦ้āđ€āļĢāļēāđ€āļĨāļĒāļ„āļĢัāļšāđ€āļžีāļĒāļ‡āđāļ„่āļāļ”āļ›ุ่āļĄ i āđ€āļžื่āļ­āđ€āļ‚ีāļĒāļ™āļ‚้āļ­āļ„āļ§āļēāļĄāļĨāļ‡āđ„āļ›āļ„āļĢัāļšāđāļ•่āđ„āļĄ่āļ•้āļ­āļ‡āđ€āļ‚ีāļĒāļ™āļ™āļ°āļ„āļĢัāļšāđƒāļŦ้āļ—่āļēāļ™ Copy Script āļ”้āļēāļ™āļĨ่āļēāļ‡āļ™ี้āļĨāļ‡āđ„āļ›āļ§āļēāļ‡āđ€āļĨāļĒāļ„āļĢัāļšāđ€āļžāļĢāļēāļ°āļ—āļēāļ‡āļ—ีāļĄāļ‡āļēāļ™āļ‚āļ­āļ‡ Lxcenter āđ€āļ„้āļēāļˆัāļ”āđƒāļŦ้āđāļĨ้āļ§āļ„āļĢัāļšāļ•āļēāļĄāļ™ี้āđ€āļĨāļĒ
Copy āđ€ิāļ­āļēāđ„āļ›āļ§āļēāļ‡āđƒāļ™āđ„āļŸāļĨ์ /etc/init.d/firewall āļˆāļēāļāļ™ั้āļ™āļ็āļāļ” Esc 1 āļ„āļĢั้āļ‡āļ—ี่āđāļ›้āļ™āļžิāļĄāļāļ” : āđāļĨāļ°āļžิāļĄ wq āđāļĨāļ° Enter āđ€āļžื่āļ­āļšัāļ™āļ—ึāļāļ„āļĢัāļš
āļˆāļēāļ”āļ™ั้āļ™āļ็āļĄāļēāļŠั่āļ‡āļ­ีāļāļ™ิāļ”āļ„āļĢัāļšāļ—āļģāđƒāļŦ้ firewall script āļĄัāļ™āļ—āļģāļ‡āļēāļ™āđ„āļ”้āļ่āļ­āļ™āļ„āļĢัāļšāđ‚āļ”āļĒāļŠั่āļ‡
# chmod 700 /etc/init.d/firewall
āđāļĨāļ°āđ€āļžิ่āļĄ Service firewall āļ‚āļ­āļ‡āđ€āļĢāļēāđ€āļĄื่āļ­āļี่āļ„āļĢัāļš … āļĒัāļ‡āđ„āļ‡āļ§่āļ° āļ‡āļ‡ … āļ”ูāļ”้āļēāļ™āļĨ่āļēāļ‡āļ„āļĢัāļš
# chkconfig –level 2345 firewall on
āđāļĨāļ°āļŠั่āļ‡ Start
# /etc/init.d/firewall start
āļ–้āļēāđ€āļŦ็āļ™āļŠāļ–āļēāļ™āļ°āļšāļ­āļāļ§่āļē OK āđ€āļĒāļ­āļ°āļ็āđƒāļŠ้āđ„āļ”้āđāļĨ้āļ§āļ„āļĢัāļšāļ‡่āļēāļĒāđ† āļ„āļĢัāļšāđāļ•่āļˆāļ°āļ˜ิāļšāļēāļĒāđ€āļĢื่āļ­āļ‡ script āļ™ิāļ”āļŦāļ™ึ่āļ‡āļ„āļĢัāļšāļ„ืāļ­ āđ€āļ„้āļēāļāļģāļŦāļ™āļ”āđƒāļŦ้āļ›ิāļ” port āļ—ุāļ port āļ่āļ­āļ™āđāļĨ้āļ§āļĄāļēāđ€āļ›ิāļ” port āļ—ี่āļˆāļģāđ€āļ›็āļ™āļŠāļģāļŦāļĢัāļš CP Kloxo āļ„āļĢัāļšāđāļ„่āļ™ั้āļ™āļ„āļĢัāļš
Write By Mr.Pishit


Thursday, September 8, 2011

Kloxo Installation Guide : āļ„ู่āļĄืāļ­āļāļēāļĢāļ•ิāļ”āļ•ั้āļ‡ Kloxo āļ™āļ°āļ•ัāļ§āđ€āļ˜āļ­


āļŦāļĨัāļ‡āļˆāļēāļāļ—ี่āļŦāļĨāļ§āļĄāļ•ัāļ§āđ„āļ›āđ€āļŠ่āļē VPS āļ‚āļ­āļ‡ PhotonVPS āļĄāļēāđāļĨ้āļ§ āđƒāļ™āđāļž็āļ„āđ€āļāļˆ warp 2 āļŠั่āļ‡ DirectAdmin āđ„āļ›āļ”้āļ§āļĒ āđāļ•่āđ„āļĄ่āđƒāļŠ้ āļāļĢ๊āļēāļāđ†āđ† āđ€āļŠีāļĒāđ€āļ‡ิāļ™āļ—ิ้āļ‡ āđ€āļžāļĢāļēāļ°āļ­āļĒāļēāļāļĨāļ­āļ‡āļ‚āļ­āļ‡āļŸāļĢีāļ”ูāļš้āļēāļ‡ āļˆāļĢิāļ‡āđ† āđ„āļĄ่āļ™่āļēāļŠั่āļ‡āļ•ั้āļ‡āđāļ•่āļ•āļ­āļ™āđāļĢāļāđāļĨ้āļ§āļĨ่āļ° āđāļĨ้āļ§āļ็āđ„āļ›āļŦāļĨāļ‡āļ—āļēāļ‡ āđ€āļŠีāļĒāđ€āļ§āļĨāļēāļัāļš Webmin āđ„āļ›āļ™ิāļ”āļŦāļ™่āļ­āļĒ āļžāļšāļāļ§่āļēāđ„āļĄ่āđƒāļŠ่āđāļ™āļ§āļ—āļēāļ‡āļ—ี่āļ•ัāļ§āđ€āļ­āļ‡āļŠāļ­āļš āļāļĢ๊āļēāļāđ†āđ† āđ€āļĨāļĒāđ€āļ›āļĨี่āļĒāļ™āđāļ™āļ§āļĄāļēāļĨāļ­āļ‡āđ€āļĨ่āļ™ Kloxo āļ”ูāļš้āļēāļ‡ āļžāļ­āļ”ีāļĄีāđ€āļ—āļĢāļ™āđ€āļ™āļ­āļĢ์āļ”้āļ§āļĒ āļˆāļ°āđ„āļ”้āđ„āļĄ่āļ•้āļ­āļ‡āļ–āļēāļĄāđƒāļ„āļĢāļ­ื่āļ™āđ„āļāļĨ āđ€āļ­ิ๊āļāđ†
āđ€āļĢิ่āļĄāļัāļ™āđ€āļĨāļĒāļ”ีāļāļ§่āļē
āļĄāļēāđ€āļŠ็āļ„āļŠāđ€āļ›็āļ„ VPS āļŦāļĢืāļ­ Dedicated āļ‚āļ­āļ‡āļ„ุāļ“āļ่āļ­āļ™ āļ§่āļēāđƒāļŠ้āļ‡āļēāļ™āđ„āļ”้āļŦāļĢืāļ­āđ„āļĄ่
1.  āļ•้āļ­āļ‡āđ€āļ›็āļ™ CentOS āļŦāļĢืāļ­ Red Hat EL (versions 5.1+) āđ€āļ—่āļēāļ™ั้āļ™āļ™āļ° āļŠāļģāļ„ัāļ 32 Bit āļ”้āļ§āļĒ
2.  āļ•้āļ­āļ‡āļĄีāđāļĢāļĄāļ­āļĒ่āļēāļ‡āļ™้āļ­āļĒ 256 MB (āļŦāļĨัāļ‡āļˆāļēāļāļ•ิāļ”āļ•ั้āļ‡ Kloxo āđāļĨ้āļ§ āļˆāļ°āđƒāļŠ้āđāļĢāļĄāļ™ิāļ”āļŦāļ™่āļ­āļĒ āļ›āļĢāļ°āļĄāļēāļ“ 33 MB āđ€āļ—่āļēāļ™ั้āļ™!!)
3.  āļ•้āļ­āļ‡āļĄีāļžื้āļ™āļ—ี่āļ§่āļēāļ‡āļ­āļĒ่āļēāļ‡āļ™้āļ­āļĒ 2 GB āļŠāļģāļŦāļĢัāļš Service āļ•่āļēāļ‡āđ† āļ”้āļ§āļĒ
āļ่āļ­āļ™āļ—ี่āļˆāļ° Install āļ็āļ•้āļ­āļ‡āļĄāļē disable SELinux āļัāļ™āļ่āļ­āļ™āđ€āļĨāļĒ āđ‚āļ”āļĒāđƒāļŠ้ command āļ”ัāļ‡āļ™ี้
su - root
setenforce 0
āļŦāļĨัāļ‡āļˆāļēāļāļ™ั้āļ™āļ็āļĄāļēāļ–ึāļ‡āļ‚ั้āļ™āļ•āļ­āļ™āļŠāļģāļŦāļĢัāļš Install āļัāļ™āđāļĨ้āļ§āļ„āļĢัāļš
Command āļ•ัāļ§āļ™ี้ āļŠāļģāļŦāļĢัāļšāļ„āļ™āļ—ี่āļĒัāļ‡āđ„āļĄ่āđ„āļ”้āļ•ิāļ”āļ•ั้āļ‡ MySQL server
su - root
yum install -y wget
wget http://download.lxcenter.org/download/kloxo/production/kloxo-install-master.sh
sh ./kloxo-install-master.sh
Command āļ•ัāļ§āļ™ี้āļŠāļģāļŦāļĢัāļšāļ„āļ™āļ—ี่āļĄี MySQL server āđāļĨ้āļ§āļ­āļĒ่āļēāļ‡āļœāļĄāļ—ี่āļ•āļ­āļ™āđƒāļŠ้ Webmin āđ€āļĄื่āļ­āļ„āļĢั้āļ‡āļ่āļ­āļ™ āļ­ิāļ­ิ
su - root
yum install -y wget
wget http://download.lxcenter.org/download/kloxo/production/kloxo-install-master.sh
sh ./kloxo-install-master.sh --db-rootpassword=āļžāļēāļŠāđ€āļ§ิāļĢ์āļ”āļŠāļģāļŦāļĢัāļš root āļ‚āļ­āļ‡āđāļ•่āļĨāļ°āļ„āļ™āļ™ั้āļ™āđāļŦāļĨāļ°āļ„āļĢัāļš
āļ็āđƒāļŠ้āđ€āļ§āļĨāļēāļ•ิāļ”āļ•ั้āļ‡āļ™ิāļ”āļŦāļ™่āļ­āļĒāļ„āļĢัāļš āđāļĨ้āļ§āļ็āļˆāļ°āļ‚ึ้āļ™āļ‚้āļ­āļ„āļ§āļēāļĄ Congratuations āļ™ั้āļ™āļ็āļŦāļĄāļēāļĒāļ„āļ§āļēāļĄāļ§่āļēāđ€āļŠāļĢ็āļˆāđ€āļĢีāļĒāļšāļĢ้āļ­āļĒāđāļĨ้āļ§āļ„āļĢัāļš
āđ€āļ§āļĨāļēāļˆāļ°āļĨ็āļ­āļāļ­ิāļ™ āļ็āđ„āļ›āļ—ี่ http://YOUR_SERVER_IP:7778 āļŦāļĢืāļ­ https://YOUR_SERVER_IP:7777
User + Password āļ็ admin āļ—ั้āļ‡āļ„ู่āđāļŦāļĨāļ°āļ„āļĢัāļš
āđ€āļŠāļĢ็āļˆāđāļĨ้āļ§āļ„āļĢัāļš āļŠāļģāļŦāļĢัāļšāļ‚ั้āļ™āļ•āļ­āļ™āļāļēāļĢāļ•ิāļ”āļ•ั้āļ‡ Kloxo āļ‡่āļēāļĒāļĄั๊āļĒāļ„āļĢัāļš āļ­ิāļ­ิ

Monday, June 27, 2011

āļ§ิāļ˜ี āļˆูāļ™ tune Kloxo āđ€āļšื้āļ­āļ‡āļ•้āļ™

āđ€āļĢิ่āļĄāđ€āļĨāļĒāļ็
php āļ็āļĨāļ‡āļžāļ§āļ xcache  kloxo āļĄีāđƒāļŦ้ enable xcache āđāļĨ้āļ§
āļ•ัāļ§āļĨāļ‡āļ็āļ­āļĒู่āļ—ี่ /script/xcache-install
http://lxcenter.org/wp-content/uploads/2010/03/kloxo_200x45_gr.png
āļ•่āļ­āļĄāļēāļ็ web server
apache httpd āļ็āļ•้āļ­āļ‡ tune āđ€āļžิ่āļĄ
/etc/httpd/conf.d/swtune.conf
ServerLimit        100
MaxClients         100
MaxRequestsPerChild  1000
min max āđ„āļĄ่āļ•้āļ­āļ‡āļĄāļēāļāđ€āļžāļĢāļēāļ°āđ€āļ›āļĨืāļ­āļ‡āđāļĢāļĄāđ„āļ›
āđ€āļžิ่āļĄāļ•āļĢāļ‡āļŠ่āļ§āļ™ serverlimit maxclient āļ‚ึ้āļ™āļĄāļē

āļŠุāļ”āļ—้āļēāļĒāļ็ mysqld āđ€āļžิ่āļĄāļ•āļĢāļ‡āļŠ่āļ§āļ™ buffer āļžāļ§āļ cache  āđƒāļŦ้āļĄāļēāļāļ‚ึ้āļ™
āļŦāļē mysqltuner.pl  tuning-primer.sh āļĄāļēāļŠ่āļ§āļĒ tune
āđāļĨ้āļ§ monitor āļ”ูāđ„āļ›āđ€āļĢื่āļ­āļĒāđ†
āđƒāļŠ้ top, mytop ,server-status āđ€āļ‚้āļēāļŠ่āļ§āļĒ


Friday, May 6, 2011

Kloxo - IP Address Changed Amidst Session. Possible Session Hijacking.

Kloxo - IP Address Changed Amidst Session. Possible Session Hijacking.


Login āđ„āļĄ่āđ„āļ”้ āđƒāļ™āļāļĢāļ“ีāļ—ี่ āļ—่āļēāļ™ āļ•ิāļ”āļ•ั้āļ‡ proxy :


āļ—่āļēāļ™āļ•้āļ­āļ‡āđ„āļ› āļ„āļĨิāļ āļ›ิāļ” āļ•āļēāļĄ āļĢูāļ› āļ™āļ°āļ„āļĢัāļš āļ–ึāļ‡ āļˆāļ° login
āđ„āļ”้

Saturday, February 12, 2011

mysqld āđ„āļĄ่āļŠāļēāļĄāļēāļĢāļ–āđƒāļŠ้āļ‡āļēāļ™āđ„āļ”้ āđāļ•่ status āļ็āđ„āļĄ่āļ•āļēāļĒ āđƒāļ„āļĢāđ€āļ„āļĒāđ€āļˆāļ­āļš้āļēāļ‡

āđāļšāļšāļ­āļĒู่āđ† āļ—ุāļāđ€āļ§็āļšāļ็ connect mysqld āđ„āļĄ่āđ„āļ”้
āđāļ•่āļžāļ­ ssh āđ€āļ‚้āļēāđ„āļ›āđ€āļŠ็āļ„
[root@server root]# service mysqld status
mysqld (pid 22214) is running...

āļœāļĄāđāļ้āđāļ„่
[root@server root]# kill -9 22214


āļĄัāļ™āļ็āđƒāļŠ้āļ‡āļēāļ™āđ„āļ”้āđ€āļĨāļĒāļ™āļ°āļ„āļĢัāļš āđ‚āļ”āļĒāđ€āļ›āļĨี่āļĒāļ™ pid
[root@server root]# service mysqld status
mysqld (pid 22548) is running...

āđāļ•่āļ›ัāļāļŦāļēāļ„ืāļ­āļ•้āļ­āļ‡āļĄāļēāļ„่āļ­āļĒ kill āļĄัāļ™āļ™āļ°āļ„āļĢัāļšāđ€āļĨāļĒāđ„āļĄ่āļĢู้āļŠāļēāđ€āļŦāļ•ุāļ§่āļēāļ—āļģāđ„āļĄāļ­āļĒู่āđ†āļĄัāļ™āļ–ึāļ‡āļ—āļģāļ‡āļēāļ™āđ„āļĄ่āđ„āļ”้āļ™āļ°āļ„āļĢัāļš
āļĄีāđƒāļ„āļĢāđ€āļ„āļĒāđ€āļˆāļ­āļš้āļēāļ‡āđ„āļŦāļĄāļ„āļĢัāļš
āđƒāļŠ้ linux + plesk āļ™āļ°āļ„āļĢัāļš
āļ‚āļ­āļšāļ„ุāļ“āļ„āļĢัāļš

āđ€āļŠ็āļ„ log āļĄัāļ™āļ‚ึ้āļ™āđāļšāļšāļ™ี้āļ™āļ°āļ„āļĢัāļšāļˆāļēāļ /var/log/mysqld.log
[root@server log]# cat mysqld.log.1
A mysqld process already exists at  Sat May 3 20:02:28 ICT 2008
080503 20:02:55  mysqld ended

080503 20:05:27  mysqld started
080503 20:05:28  InnoDB: Out of memory in additional memory pool.
InnoDB: InnoDB will start allocating memory from the OS.
InnoDB: You may get better performance if you configure a bigger
InnoDB: value in the MySQL my.cnf file for
InnoDB: innodb_additional_mem_pool_size.
080503 20:05:28  InnoDB: Started
080503 20:05:28  Found invalid password for user: 'dbservicesrn'@'localhost'; Ignoring user
080503 20:05:28  Found invalid password for user: 'school'@'localhost'; Ignoring user
080503 20:05:28  Found invalid password for user: 'p5wd2'@'localhost'; Ignoring user
080503 20:05:28  Found invalid password for user: 'wixx8'@'localhost'; Ignoring user
/usr/libexec/mysqld: ready for connections

 ===========================

āļ–้āļēāđ„āļĄ่āļĄีāļāļēāļĢāđƒāļŠ้ innodb āļ็āđƒāļŠ่ --skip-innodb āđƒāļ™ my.cnf 



āļ–้āļēāđ„āļĄ่āļĄีāļāļēāļĢāđƒāļŠ้ innodb āļ็āđƒāļŠ่ --skip-innodb āđƒāļ™ my.cnf


āļ™่āļēāļˆāļ°āđƒāļŠ่āļ•āļĢāļ‡āđ„āļŦāļ™āļŦāļĢืāļ­āļ„āļĢัāļš
[mysqld]
innodb_data_file_path=ibdata1:10M:autoextend
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

[mysql.server]
user=mysql
basedir=/var/lib

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

āļœāļĄāđ€āļˆāļ­āđāļ›āļĨāļāđ€āļĢื่āļ­āļ‡āļ™ึāļ‡āļ™āļ°āļ„āļĢัāļš
āļ„ืāļ­ āļœāļĄāļĨāļ­āļ‡
[root@server root]# ps auxww |grep mysql
root    24035  0.0  0.1  4248  544 ?        S    May03  0:00 /bin/sh /usr/bin/safe_mysqld --defaults-file=/etc/my.cnf
mysql    32330  0.1  4.2 104588 21988 ?      S    09:58  0:00 /usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking
root      315  0.0  0.1  3684  660 pts/0    S    10:01  0:00 grep mysql

āđāļ•่ āļžāļ­āļĨāļ­āļ‡ cat /var/run/mysqld/mysqld.pid āļāļĨัāļšāđ„āļĄ่āļĄีāļ­āļ°āđ„āļĢāđ€āļĨāļĒ āđ€āļžāļĢāļēāļ°āļĨāļ­āļ‡āđ€āļ„āļĢื่āļ­āļ‡āļ­ื่āļ™āđāļĨ้āļ§āļĄัāļ™āļˆāļ°āļ•้āļ­āļ‡āļĄี āļ­ัāļ™āđ€āļ”ีāļĒāļ§āļัāļš pid āđ€āļŠ่āļ™ pid 32330
[root@server root]# cat /var/run/mysqld/mysqld.pid

āļ­āļĒ่āļēāļ‡āļ™ี้āļœāļĄ [root@serverroot]# vi /var/run/mysqld/mysqld.pid
āđƒāļŠ่ id āđ„āļ›āļˆāļ°āđ€āļ›็āļ™āđ„āļ›āđ„āļŦāļĄāļ„āļĢัāļš

āđāļĨāļ°āļ™่āļēāļˆāļ°āđ€āļีāļĒāļ§āļัāļšāļ›ัāļāļŦāļēāļ™ี้āđ„āļŦāļĄāļ„āļĢัāļš

āļœāļĄāļŠัāļ‡āđ€āļŦāļ•ุāđ€āļ„āļĢื่āļ­āļ‡āļ™ี้ āđāļ›āļĨāļāļāļ§่āļēāđ€āļ„āļĢื่āļ­āļ‡āļ­ื่āļ™āļ•āļĢāļ‡ pid file āļ—ี่āđ€āļ็āļš mysql āļ™āļ°āļ„āļĢัāļš āđ„āļĄ่āļĢู้āđ€āļีāļĒāļ§āļŦāļĢืāļ­āđ€āļ›āļĨ่āļē

āđ€āļ„āļĢื่āļ­āļ‡āļ­ื่āļ™
mysql    21365  5.9  0.9 68452 4284 ?        S    Apr18 1364:29 /usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/mysqld.pid --skip-locking

āļ•āļĢāļ‡ --pid-file=/var/lib/mysql/mysqld.pid āļˆāļ°āļ­āļĒู่āļ—ี่ /var/lib/mysql/....xxx


āđ€āļ„āļĢื่āļ­āļ‡āļ—ี่āļĄีāļ›ัāļāļŦāļē
mysql    32330  0.1  4.3 104680 22328 ?      S    09:58  0:00 /usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking


āļĄัāļ™āđ€āļ›็āļ™ --pid-file=/var/run/mysqld/mysqld.pid  āļ„ืāļ­āđ„āļ›āļ­āļĒู่āļ—ี่ /var/run/mysqld/..xxxx

āđ„āļĄ่ āļĢู้āļ§่āļēāļ­ัāļ™āđ„āļŦāļ™āļ™่āļēāļˆāļ°āļ–ูāļāļ•้āļ­āļ‡āļŦāļĢืāļ­āļ„āļĢัāļš āđāļĨ้āļ§āļĄัāļ™āļ„ืāļ­āļ­āļ°āđ„āļĢāļĄีāļœāļĨāļ­āļĒ่āļēāļ‡āđ„āļĢ āļ™่āļēāļˆāļ°āđ€āļี่āļĒāļ§āļัāļšāļ›ัāļāļŦāļēāļŦāļĢืāļ­āđ€āļ›āļĨ่āļēāđ€āļžāļĢāļēāļ° āļœāļĄāđ„āļ›āđ€āļŠ็āļ„āļ”ูāļ—ี่ file =/var/run/mysqld/mysqld.pid āļ›āļĢāļēāļāļāļ§่āļēāđ„āļĄ่āļĄีāļ™āļ°āļ„āļĢัāļš āđ€āļĨāļĒāđ„āļ”้āļŠāļĢ้āļēāļ‡āļ‚ี้āļ™āļĄāļēāđāļĨ้āļ§āļ็āđƒāļŠ่ pid āđ€āļีāļĒāļ§āļัāļš mysql status āđ€āļ‚้āļēāđ„āļ›
āļ•āļ­āļ™āļ™ี้ āļĨāļ­āļ‡āļ­āļĒู่āļ§่āļēāļˆāļ°āļĄีāļ›ัāļāļŦāļēāļ­ีāļāļŦāļĢืāļ­āđ€āļ›āļĨ่āļē

āļ›ัāļāļŦāļēāļ™่āļēāļˆāļ°āļĄāļēāļˆāļēāļ pid āđ„āļŸāļĨ์āļ—ี่āļ§่āļēāļĄāļēāļ„āļĢัāļš
āļ›āļĢāļ°āļĄāļēāļ“āļ§่āļē service on āļ­āļĒู่āđāļ•่āđ„่āļĄ่āļĄี pid āļ­āļĒุ่āđƒāļ™āđ„āļŸāļĨ์
āļ•ัāļ§ monitor service āļ็āđ€āļĨāļĒāļ„ิāļ”āļ§่āļē down āđāļĨāļ°āļ—āļģāļāļēāļĢ start āđƒāļŦ้

āļĨāļ­āļ‡āļŠั่āļ‡ /etc/init.d/mysql(d) stop āļ•ิāļ”āļัāļ™ 2 āļ„āļĢั้āļ‡ (āđ€āļĢิ่āļĄāļŠั่āļ‡āļ•āļ­āļ™āļ•้āļ™āļ™āļēāļ—ีāđ€āļžื่āļ­āļŦāļĨีāļāđ€āļĨี่āļĒāļ‡ cron)
āđāļĨ้āļ§āļ•āļēāļĄāļ”้āļ§āļĒ killall mysqld
ps āļ”ูāļ§่āļēāļĄี process mysql āđ€āļŦāļĨืāļ­āļ­āļĒู่āļŦāļĢืāļ­āđ€āļ›āļĨ่āļē āļ–้āļēāļĄีāļ็ kill āļ­āļ­āļāđƒāļŦ้āļŦāļĄāļ”
āļĢāļ°āļŦāļ§่āļēāļ‡āļ™ี้āđ„āļĄ่āļ„āļ§āļĢāļˆāļ°āļĄี process mysql run āļ‚ึ้āļ™āļĄāļēāđ€āļ­āļ‡

āđ€āļŠāļĢ็āļˆāđāļĨ้āļ§āļŠั่āļ‡ start mysql āļˆāļēāļāđƒāļ™ plesk āļŦāļĢืāļ­āļ–้āļēāđƒāļ™ plesk āđ„āļĄ่āļĄี āļ็ /etc/init.d/mysql(d) restart
āđ€āļŠ็āļ„āļ§่āļēāļĄี pid āđƒāļ™āđ„āļŸāļĨ์āļŦāļĢืāļ­āđ€āļ›āļĨ่āļē
 


āđ€āļ›็āļ™āļ­ีāļāđāļĨ้āļ§āļ™āļ°āļ„āļĢัāļš āđ€āļĨāļĒ status āļ”ูāđ„āļ”้āļ•āļēāļĄāļ™ี้
[root@server root]# mysql
ERROR 1040: Too many connections

[root@server mysql]# mysqladmin processlist
mysqladmin: connect to server at 'localhost' failed
error: 'Too many connections'

[root@server mysqld]# /etc/init.d/mysqld stop
Stopping MySQL:                                            [FAILED]
[root@server mysqld]# /etc/init.d/mysqld stop
Stopping MySQL:                                            [FAILED]


[root@server mysqld]# killall mysqld

[root@server mysqld]# ps auxww |grep mysql
root      7668  0.0  0.1  3688  660 pts/2    S    18:13  0:00 grep mysql

[root@server mysqld]# /etc/init.d/mysqld restart
Stopping MySQL:                                            [FAILED]
Starting MySQL:     


[root@server mysqld]# cat /var/run/mysqld/mysqld.pid

āļŠุāļ”āļ—้āļēāļĒāđ€āļŦāļĄืāļ­āļ™āļĄัāļ™āļŠāļĢ้āļēāļ‡ file āļ‚ึ้āļ™āļĄāļēāđāļ•่āđ„āļĄ่āđƒāļŠ่ pid āđ€āļ‚้āļēāđ„āļ›āļ„ืāļ­ āđ€āļ›็āļ™file āļ§่āļēāļ‡āđ†

================================

āļ—āļģ mysqld processlist

Uptime: 1151  Threads: 1  Questions: 12155  Slow queries: 0  Opens: 704  Flush tables: 1  Open tables: 64 Queries per second avg: 10.560

āđāļĨāļ°āļĄัāļ™āļĄี process āđ€āļŦāļĄืāļ­āļ™āļĄัāļ™ Lock āļ™āļ°āļ„āļĢัāļš āđ„āļĄ่āļĒāļ­āļĄāļŦāļēāļĒāđ„āļ›āđ€āļ­āļ‡āļˆāļēāļ processlist āđ€āļĢāļēāļˆāļ°kill āļĄัāļ™auto āđ„āļ”้āđ„āļŦāļĄāļ„āļĢัāļšāļŦāļĢืāļ­āļĄัāļ™ āļ™่āļēāļĄีāļ›ัāļāļŦāļēāļ­āļ°āđ„āļĢāļ—āļģāđ„āļĄāļĄัāļ™āđ„āļĄ่āļĒāļ­āļĄāļŦāļēāļĒ
| 1127 | dbdb| localhost | dbdb| Query          | 3417 | update          | insert into nuke_msanalysis_search ( words, hits, today, hitstoday, xdays, hitsxdays ) values ( '&agrave;&sup1; |
| 1148 | dbdb| localhost | dbdb| Query          | 3392 | Locked          | update nuke_msanalysis_search set hits=hits+1, today='2008-05-04', hitstoday=hitstoday+1, hitsxdays= |
| 1163 | dbdb| localhost | dbdb| Query          | 3380 | Locked          | update nuke_msanalysis_search set hits=hits+1, today='2008-05-04', hitstoday=hitstoday+1, hitsxdays= |
| 1178 | dbdb| localhost | dbdb| Query          | 3365 | Locked          | update nuke_msanalysis_search set hits=hits+1, today='2008-05-04', hitstoday=hitstoday+1, hitsxdays= |
| 1508 | dbdb| localhost | dbdb| Query          | 2849 | Locked          | insert into nuke_msanalysis_search ( words, hits, today, hitstoday, xdays, hitsxdays ) values ( '&agrave;&cedil; |
| 1522 | dbdb| localhost | dbdb| Query          | 2819 | Locked          | insert into nuke_msanalysis_search ( words, hits, today, hitstoday, xdays, hitsxdays ) values ( '&agrave;&sup1; |
| 2307 | dbdb| localhost | dbdb| Query          | 1715 | Locked          | update nuke_msanalysis_search set hits=hits+1, today='2008-05-04', hitstoday=hitstoday+1, hitsxdays= |
| 2419 | dbdb| localhost | dbdb| Query          | 1535 | Locked          | update nuke_msanalysis_search set hits=hits+1, today='2008-05-04', hitstoday=hitstoday+1, hitsxdays= |
| 2448 | Loli_phpBB    | localhost | phpBB          | Query          | 1472 | update          | INSERT INTO phpbb_posts_text (post_id, post_subject, bbcode_uid, post_text) VALUES (14924, 'CODE GEA |
| 2538 | Loli_phpBB    | localhost | phpBB          | Query          | 1326 | Locked          | INSERT INTO phpbb_posts_text (post_id, post_subject, bbcode_uid, post_text) VALUES (14925, 'CODE GEA |

(āļ­ัāļ™āļ™ี้āđāļ„่āļŠ่āļ§āļ™āļ™ึāļ‡āļ™āļ°āļ„āļĢัāļš)

āļžāļ­āļ—āļĢāļēāļšāļ›ัāļāļŦāļēāļĨāļ°āļ„āļĢัāļš āļ•āļ­āļ™āđāļĢāļāļ™ึāļāļ§่āļēāđ€āļ›็āļ™āļ—ี่ script āļĨุāļāļ„้āļēāđāļ•่āđ€āļ‚้āļēāđ„āļ›āđ€āļŠ็āļ„āđāļĨ้āļ§
āđ€āļ›็āļ™āļŦāļĨāļēāļĒāđ€āļ§็āļšāđ€āļĨāļĒ āđ‚āļ”āļĒāđ€āļ‰āļžāļēāļ°āđ€āļ§็āļšāļ—ี่āđ€āļ›็āļ™ script āļŠāļģāđ€āļĢ็āļˆāļĢูāļ› āļžāļ§āļ phpbb smf
āļĄัāļ™āļˆāļ°āđ€āļŦāļĨืāļ­ process āļ„้āļēāļ‡āđ„āļ§้
āđ€āļŠ่āļ™
UPDATE smf_members
                SET
                        lastLogin = 1209916692,
                        memberIP = '58.8.23.64',
                        memberIP2 = '5 |

INSERT INTO smf_messages
                        (ID_BOARD, ID_TOPIC, ID_MEMBER, subject, body, posterName, posterEmai |


āđ€āļĨāļĒāļ„ิāļ”āļ§่āļēāđ€āļ„āļĢืāļ­่āļ‡āļ™่āļēāļˆāļ°āļĄีāļ›ัāļāļŦāļēāļ—ี่āđ„āļĄ่āļŠāļ­āļš āđ€āļ„āļĨีāļĒāļĢ์ process āđ€āļ่āļēāđ† āļ—ิ้āļ‡ āļ—āļģāđƒāļŦ้āļĄัāļ™āđ€āļ•็āļĄāđāļĨāļ°āļ็āļ„้āļēāļ‡āđƒāļŦ้āļ—ี่āļŠุāļ”āļ™āļ°āļ„āļĢัāļš
āđāļšāļšāļ™ี้āđ€āļĢāļēāļˆāļ°āđāļ้āļ­āļĒ่āļēāļ‡āđ„āļĢāļ”ีāļĄีāļ—āļēāļ‡ āđ€āļŠ็āļ„āđƒāļŦ้āļĄัāļ™ kill auto āđ„āļŦāļĄāļ„āļĢัāļš 

āļˆāļēāļ error āļĄัāļ™āđāļˆ้āļ‡āļ§่āļē memory pool āļ™ั้āļ™āļĄีāļ‚āļ™āļēāļ”āđƒāļŦāļ่āđ€āļิāļ™āđ„āļ›

āđāļ•่āļ§่āļē my.cnf āļ‚āļ­āļ‡āļ„ุāļ“āļ็āđ„āļĄ่āđ„āļ”้āļāļĨ่āļēāļ§āļ–ึāļ‡āđ€āļ­āļēāđ„āļ§้āđ€āļĨāļĒ

āļ”ัāļ‡āļ™ั้āļ™ āļĄัāļ™āļ„ืāļ­āļāļēāļĢāļ”ึāļ‡āļ„่āļē default āļ­āļ­āļāļĄāļēāđƒāļŠ้āļ™ั่āļ™āđ€āļ­āļ‡

āļ—ี่āļĄัāļ™āđ€āļิāļ‚ึ้āļ™āļ็āđ€āļžāļĢāļēāļ°āļ§่āļē ram āļ‚āļ­āļ‡āļ„ุāļ“āļŦāļĄāļ” āđāļĨāļ°āļĄีāđ„āļĄ่āđ€āļžีāļĒāļ‡āļžāļ­āļ—ี่āļˆāļ°āļˆัāļšāļˆāļ­āļ‡āļĄāļēāļĢāļ­āļ‡āļĢัāļšāļāļēāļĢāļ—āļģāļ‡āļēāļ™

āļ§ิāļ˜ี āđāļ้āļ็āļ„ืāļ­ āđƒāļŦ้āļ•ั้āļ‡āļ„่āļēāđƒāļ™āļŠ่āļ§āļ™āļ‚āļ­āļ‡ innodb āđƒāļŦāļĄ่ āđ‚āļ”āļĒāļ—ี่āļ•ั้āļ‡āđ€āļžื่āļ­āđƒāļŦ้āđƒāļŠ้āļ‡āļēāļ™ āļŦāļĢืāļ­āļˆāļ­āļ‡ memory āđƒāļŦ้āļ™้āļ­āļĒāļĨāļ‡ āđ€āļžāļĢāļēāļ°āļ§่āļēāđ„āļĄ่āļ•ั้āļ‡āļĄัāļ™āļˆāļ°āđƒāļŠ้āļ„่āļē default

āļ‹ึ่āļ‡ āļ•āļ­āļ™āļ™ี้āđ€āļ›็āļ™āļ„่āļēāđ€āļ—่āļēāđ„āļĢ āļŠāļēāļĄāļēāļĢāļ–āļ•āļĢāļ§āļˆāļŠāļ­āļšāđ„āļ”้āļˆāļēāļ show status āļ„āļĢัāļš āļŦāļĢืāļ­āļˆāļ°āļĨ็āļ­āļāļ­ิāļ™āļāļēāļ™āļ° root āđƒāļ™ phpmyadmin āđ€āļžื่āļ­āļ—āļģāļāļēāļĢāļ”ูāļ„่āļēāļ›ัāļˆāļˆุāļšัāļ™āđāļĨ้āļ§āđ„āļ›āļ›āļĢัāļšāđƒāļŦ้āļ™้āļ­āļĒāļĨāļ‡āļ็āđ„āļ”้āļ„āļĢัāļš


āļŦāļĢืāļ­āđ„āļĄ่āļ­āļĒāļēāļāđ€āļ„āļĢีāļĒāļ” āđ„āļĄ่āļ­āļĒāļēāļāļ„ิāļ”āļĄāļēāļ āļ็

--skip-innodb

āđƒāļ™ my.cnf āļĄัāļ™āļ‹āļ°āđ€āļĨāļĒ āļ‡่āļēāļĒāļ”ี āđāļ•่āļœāļĨāļ—ี่āļ•āļēāļĄāļĄāļēāļ„ืāļ­  user āļˆāļ°āđ„āļĄ่āļŠāļēāļĄāļēāļĢāļ–āđƒāļŠ้āļ‡āļēāļ™āđāļšāļš innodb āđ„āļ”้

āļŠāļģāļŦāļĢัāļš āđ€āļĢื่āļ­āļ‡āļ—ี่āļŠāļ„āļĢิāļ› sql āļ„้āļēāļ‡āļ­āļĒู่āļ™ั้āļ™ āļ›āļĢāļāļ•ิāļœāļĄāļˆāļ°āđ„āļĄ่āđ€āļˆāļ­āļ„āļĢัāļš āđāļ•่āļœāļĄāđ€āļ„āļĒāđ€āļˆāļ­āļ—ีāļ™ึāļ‡ āļ‹ึ่āļ‡āļ„āļĢāļēāļ§āļ™ั้āļ™āđ€āļิāļ”āļˆāļēāļāļāļēāļĢ restart apache āļ„āļĢัāļš āļ—āļģāđƒāļŦ้ process SQL āļ—āļģāļ‡āļēāļ™āļĒัāļ‡āđ„āļĄ่āļŠāļģāđ€āļĢ็āļˆ

āđ‚āļ”āļĒāļ›āļĢāļāļ•ิāļˆāļ°āđ€āļิāļ”āļˆāļēāļāļāļēāļĢ lock table āļ„āļĢัāļš āđāļĨ้āļ§āđ„āļ› restart apache āļ“ āļˆุāļ”āļ™ั้āļ™āļžāļ­āļ”ี āļ—āļģāđƒāļŦ้ SQL āđ„āļĄ่āļŠāļĄāļšูāļĢāļ“์āđāļĨāļ°āđ„āļĄ่āļŠāļēāļĄāļēāļĢāļ– āļ›āļĨāļ”āļĨ็āļ­āļ„ table āđ„āļ”้ āļžāļ­āļĄีāļāļēāļĢāļ—āļģ DML āđƒāļ™ table āļ™ั้āļ™āļ็āļ—āļģāđƒāļŦ้āđ€āļิāļ”āļāļēāļĢ lock āđ„āļ”้ āđ€āļžāļĢāļēāļ°āļ§่āļē table āļĒัāļ‡āđ„āļĄ่āđ„āļ”้āļ–ูāļāļ›āļĨāļ” lock āļ™ั่āļ™āđ€āļ­āļ‡

āļŠāļģāļŦāļĢัāļšāļŠ่āļ§āļ™āļ™ี้āļœāļĄāļĒัāļ‡āđ„āļĄ่āđāļ™่āđƒāļˆāļ§่āļē āđāļ้āļ”้āļ§āļĒāļ§ิāļ˜ีāđƒāļ”āļ„āļĢัāļš āđ€āļžāļĢāļēāļ°āļ§่āļēāļœāļĄāļĨāļ­āļ‡āđ„āļĄ่āđ„āļ”้ āđ€āļžāļĢāļēāļ°āļ–้āļē lock āļ—ีāđāļĨ้āļ§ load āļˆāļ°āļžุ่āļ‡āļ‚ึ้āļ™āļĄāļēāđ€āļĨāļĒāļ„āļĢัāļš āđ€āļžāļĢāļēāļ°āļ§่āļēāļĄัāļ™āļˆāļ°āđ€āļิāļ”āļāļēāļĢāļĢāļ­āļāļēāļĢāđ€āļ‚้āļēāļĄāļēāđ€āļ›āļĨี่āļĒāļ™āļ„่āļē āđāļ•่āļĄัāļ™āļ—āļģāđ„āļĄ่āđ„āļ”้āļ„āļĢัāļš

āļ•āļ­āļ™āļ™ี้āļĨāļ­āļ‡āļ›āļĢัāļšāļ„่āļē mysql persistance āđƒāļŦ้āđ€āļ›็āļ™ 0 āļ”ูāļ™āļ°āļ„āļĢัāļš āđāļĨ้āļ§āļ•ั้āļ‡āļ„่āļē time out āļ‚āļ­āļ‡ mysql āđ€āļ­āļēāđ„āļ§้āđƒāļŦ้āļ•่āļģāļĨāļ‡ āļˆāļ°āļ—āļģāđƒāļŦ้ clear connection āđ„āļ”้āđ€āļĢ็āļ§āļ‚ึ้āļ™āļ„āļĢัāļš

āļĢāļšāļāļ§āļ™āđ€āļŠ็āļ„ my.cnf āļŦāļ™่āļ­āļĒāđ„āļ”้āđ„āļŦāļĄāļ„āļĢัāļšāļ§่āļēāļĄัāļ™āļœิāļ”āļ•āļĢāļ‡āđ„āļŦāļ™ āđ€āļžāļĢāļēāļ°āļĢู้āļŠึāļāļ§่āļēāļĄัāļ™āļŠั้āļ™āđ†āļœิāļ”āļ›āļāļ•ิāļ™āļ°āļ„āļĢัāļš
[root@server etc]# cat /etc/my.cnf
[mysqld]
innodb_data_file_path=ibdata1:10M:autoextend
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
   
[mysql.server]
user=mysql
basedir=/var/lib

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid


āļŦāļĢืāļ­ āđ€āļĢāļēāļŠāļēāļĄāļēāļĢāļ– copy my.cnf āđ€āļ„āļĢื่āļ­āļ‡āļ­ื่āļ™āļ—ีāļ—āļģāļ‡āļēāļ™āļ›āļāļ•ิāļĄāļēāļ—ัāļšāđ„āļ”้āđ€āļĨāļĒāđ„āļŦāļĄāļ„āļĢัāļš
āļœāļĄāļĨāļ­āļ‡āđ€āļ—ีāļĒāļšāļัāļšāđ€āļ„āļĢื่āļ­āļ‡āļ­ื่āļ™āļˆāļ°āļĄี āļ„āļģāļŠั่āļ‡āļĄāļēāļāļāļ§่āļēāđ€āļĒāļ­āļ°āđ€āļĨāļĒ
āđ€āļŠ่āļ™
# The MySQL server
[mysqld]
port            = 3306
socket          = /var/lib/mysql/mysql.sock
skip-locking
set-variable    = key_buffer=16M
set-variable    = max_allowed_packet=1M
set-variable    = table_cache=64
set-variable    = sort_buffer=512K
set-variable    = net_buffer_length=8K
set-variable    = myisam_sort_buffer_size=8M

āđ€āļĨāļĒāļŠāļ‡āļŠัāļĒāļ§่āļēāļ­āļĒู่āđ†āļ—āļģāđ„āļĄāļĄัāļ™āļŦāļēāļĒāđ„āļ› 

Friday, February 11, 2011

mysqld dead but subsys locked āđ‚āļ‚āļ§์āđāļšāļšāļ™ี้ āļ•ิāļ”āļ•ั้āļ‡āđāļ•่ kloxo āļ­āļĒ่āļēāļ‡āđ€āļ”ีāļĒāļ§ āđ€āļิāļ”āļˆāļēāļāļ­āļ°āđ„āļĢ

ysqld dead but subsys locked āđ‚āļ‚āļ§์āđāļšāļšāļ™ี้ āļ•ิāļ”āļ•ั้āļ‡āđāļ•่ kloxo āļ­āļĒ่āļēāļ‡āđ€āļ”ีāļĒāļ§ āđ€āļิāļ”āļˆāļēāļāļ­āļ°āđ„āļĢ āļĒัāļ‡āđ„āļĄ่āđ„āļ”้āđƒāļŠ่āđ€āļ§็āļšāđ€āļĨāļĒ

āļ•้āļ­āļ‡āļ—āļģāļ­āļ°āđ„āļĢāļ—ี่āđ„āļĄ่āđƒāļŦ้āđ€āļ›็āļ™āļš่āļ­āļĒāđ†āļ„āļĢัāļš
Quote
100811 13:29:40  mysqld started
100811 13:29:40  InnoDB: Started; log sequence number 0 71442
100811 13:29:40 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.91'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution
100812 11:59:03 [Note] /usr/libexec/mysqld: Normal shutdown

100812 11:59:03  InnoDB: Starting shutdown...
100812 11:59:04  InnoDB: Shutdown completed; log sequence number 0 71452
100812 11:59:04 [Note] /usr/libexec/mysqld: Shutdown complete

100812 11:59:04  mysqld ended

100812 12:01:12  mysqld started
100812 12:01:13  InnoDB: Started; log sequence number 0 71452
100812 12:01:14 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.91'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution
100812 12:31:53 [Note] /usr/libexec/mysqld: Normal shutdown

100812 12:31:55  InnoDB: Starting shutdown...
100812 12:31:56  InnoDB: Shutdown completed; log sequence number 0 71452
100812 12:31:56 [Note] /usr/libexec/mysqld: Shutdown complete

100812 12:31:56  mysqld ended

100812 12:36:11  mysqld started
100812 12:36:11  InnoDB: Started; log sequence number 0 71452
100812 12:36:11 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.91'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution
100812 12:54:14 [Note] /usr/libexec/mysqld: Normal shutdown

100812 12:54:14  InnoDB: Starting shutdown...
100812 12:54:16  InnoDB: Shutdown completed; log sequence number 0 71452
100812 12:54:16 [Note] /usr/libexec/mysqld: Shutdown complete

100812 12:54:16  mysqld ended

100812 12:56:28  mysqld started
100812 12:56:28  InnoDB: Started; log sequence number 0 71452
100812 12:56:29 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.91'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution
100812 13:17:07 [Note] /usr/libexec/mysqld: Normal shutdown

100812 13:17:09  InnoDB: Starting shutdown...
100812 13:17:11  InnoDB: Shutdown completed; log sequence number 0 71452
100812 13:17:11 [Note] /usr/libexec/mysqld: Shutdown complete

100812 13:17:11  mysqld ended
 
========================================
āļĢู้āđāļ•่āļ§่āļēāļ–้āļēāđ€āļ›็āļ™āļš่āļ­āļĒāđ† āđ€āļ‚้āļēāļĢāļ°āļ§ัāļ‡āđ„āļĄ่āļŦāļēāļĒ āļĄีāļ§ิāļ˜ีāđāļ้āļĄāļēāđƒāļŦ้āļ„āļĢัāļš

#chown -R mysql.mysql /var/run/mysqld
Remove lock File '/var/lock/subsys/mysqld'
#killall -9 mysqld
#service mysql restart

File/Dir Permissions MySQL daemon āļ—āļģāļ‡āļēāļ™āļ”้āļ§āļĒāļŠิāļ—āļ˜ิāļ‚āļ­āļ‡āļĒูāļŠāđ€āļ‹āļ­āļĢ์ mysql āđāļĨāļ°āļāļĢุ๊āļ› mysql āļ„āļĢัāļš āļ”ัāļ‡āļ™ั้āļ™ āļ–้āļēāđ„āļŸāļĨ์āļāļēāļ™āļ‚้āļ­āļĄูāļĨāļ„ุāļ“āļāļģāļŦāļ™āļ”āļŠิāļ—āļ˜ิāđ€āļ›็āļ™ root:root āļĨ่āļ°āļ็ MySQL daemon āļ็āļˆāļ°āļ‹ึ่āļ‡āļ—āļģāļ‡āļēāļ™āđ€āļ›็āļ™ mysql:mysql āļ็āļˆāļ°āđ„āļĄ่āļŠāļēāļĄāļēāļĢāļ–āđ€āļ‚้āļēāļ–ึāļ‡āđ„āļŸāļĨ์āđ„āļ”้āļ„āļĢัāļš

āļĨāļ­āļ‡āđ€āļŠ็āļ„āļ•āļēāļĄāļ™ี้āļ”ูāļ„āļĢัāļš
[root@databaseserver~]$ /etc/rc.d/init.d/mysqld status
mysqld dead but subsys locked

chkconfig:
[root@databaseserver~]$ /sbin/chkconfig --list mysqld
mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off

File/Dir Permissions:
- /var/lib/mysql owned by mysql:mysql
- /var/run/mysqld/mysqld.pid owned by mysql:mysql

PID:
[root@databaseserver~]$ ls -lh /var/run/mysqld/mysqld.pid
-rw-rw---- 1 mysql mysql 5 Mar 24 05:48 /var/run/mysqld/mysqld.pid

Running Processes:
[root@databaseserver~]$ ps -ef | grep mysql
root 3126 1 0 Mar24 ? 00:00:00 /bin/sh /usr/bin/mysqld_safe --defaults-file=/etc/my.cnf --pid-file=/var/run/mysqld/mysqld.pid --log-error=/var/log/mysqld.log
mysql 3162 3126 0 Mar24 ? 00:34:07 /usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking --socket=/var/lib/mysql/mysql.sock 
 ============================================
 
 āđ„āļĄ่āđ€āļี่āļĒāļ§āļัāļš selinux=disabled āđƒāļŠ่āļĄั้āļĒāļ„āļĢัāļš āļœāļĄāļ›ิāļ”āđ„āļ§้āļ­āļĒู่ 
āđāļš่āļ‡ partition āđ„āļ§้āļĒัāļ‡āđ„āļ‡āļ„āļĢัāļš āļĨāļ­āļ‡ df -h āļĄāļēāļ”ูāļŦāļ™่āļ­āļĒāļ„āļĢัāļš 

āļœāļĄāđƒāļŠ้ centos 5.4 5.5 āļ็āđ€āļ›็āļ™

[root@27AO30 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                      448G  1.9G  423G  1% /
/dev/sda1              99M  12M  82M  13% /boot
tmpfs                2.0G    0  2.0G  0% /dev/shm
 
āļˆāļēāļāļ›ัāļāļŦāļēāļ™ี้ mysqld dead but subsys locked

folder āđƒāļ™ /var/lib/mysql
owner āđ€āļ›็āļ™ mysql  cmod āđ€āļ›็āļ™ 755 āđāļĨ้āļ§āļ„āļĢัāļš

āđāļ•่āļšāļēāļ‡āļ„āļĢั้āļ‡āļ็āļĒัāļ‡āđ€āļ›็āļ™āļ­ีāļāļ„āļĢัāļš āļ—āļģāđ„āļ‡āļ”ี 

āļ”ูāļˆāļēāļ mysqld.log āļ—ี่āļ‚้āļ­āļ„āļ§āļēāļĄāđāļĢāļāđāļĨ้āļ§āđ„āļĄ่āđ„āļ”้āļšāļ­āļ error āļ­āļ°āđ„āļĢ
āļ”ูāļˆāļēāļāļžื้āļ™āļ—ี่āļ็āđ€āļŦāļĨืāļ­āđ€āļžีāļĒāļš
āļĨāļ­āļ‡āļ”ู Ram āļ„āļĢัāļšāļ§่āļēāđ€āļŦāļĨืāļ­āđ€āļ—่āļēāđ„āļŦāļĢ่ (āļ”ูāļˆāļēāļ shm āđāļĨ้่āļ§āļ™่āļēāļˆāļ°āļĄี 4G āđ„āļĄ่āļ™่āļēāļŦāļĄāļ”āļ‡่āļēāļĒāđ†)
āđ€āļ›็āļ™āļš่āļ­āļĒāļ‚āļ™āļēāļ”āļ—ุāļ 30 āļ™āļēāļ—ี āļĨāļ­āļ‡ top āļ—ิ้āļ‡āđ„āļ§้āđāļĨ้āļ§āļ”ู ram āļัāļš process āļ—ี่āļ—āļģāļ‡āļēāļ™āļŦāļ™ัāļāđ† āļ„āļĢัāļš

āđāļĨ้āļ§āđ€āļ„āļĢื่āļ­āļ‡āļ™ี้āļĨāļ‡ apache āļ”้āļ§āļĒāļŦāļĢืāļ­āđ€āļ›āļĨ่āļēāļ„āļĢัāļš āļŦāļĢืāļ­āļ§่āļēāļĨāļ‡ mysql āļĨ้āļ§āļ™āđ†


Thursday, February 10, 2011

Alert: Could Not Connect to Database: The error has been logged. Please contact the administrator....

I ssh to server with root roles and change mysql root password.

When I login to localhost:7777 with user admin and create new database, I get error below:

Quote:
Alert: Could Not Connect to Database: The error has been logged. Please contact the administrator....


Old database still work. How to fix it?


========================================

Home (admin)/Servers/Server Home (localhost)/Database/Admins

and change the password to the one u provided over ssh

i'm not much a linux guy but have learned that ssh with root can make me a lot of problems (probably cause i'm not a linux guy


---------------------------------------------------------------------------
try


Home (admin)/Servers/Server Home (localhost)/Database/Admins

and change the password to the one u provided over ssh

i'm not much a linux guy but have learned that ssh with root can make me a lot of problems (probably cause i'm not a linux guy  )


Thanks but I get error below:
=> Alert: could_not_connect_to_db_admin 


------------------------------------------------------------------------
Home (admin)/Servers/Server Home (localhost)/Mysql Password Reset

maybe that will help.


Did you by chance modify permissions or the password to the kloxo user?

then try
Home (admin)/Servers/Server Home (localhost)/Mysql Password Reset

maybe that will help.


It's work. Thanks for help.


   

Saturday, February 5, 2011

Kloxo āļ­ัāļžāđ„āļŸāļĨ์āđāļĨ้āļ§ Alert: file_exists_not_owned āđāļ้āļĒัāļ‡āđ„āļ‡

 āļ­ัāļžāđ„āļŸāļĨ์ zip āļœ่āļēāļ™āļ—āļēāļ‡ File Manager āļ‚āļ­āļ‡ Kloxo āđāļ•่

Alert: file_exists_not_owned [/home/admin/mydomain.net/test//xxxxxxxt.zip]

āđāļ้āļĒัāļ‡āđ„āļ‡āļ„āļĢัāļš


 ================================================
Alert: file_exists_not_owned [__path_customer_root/admin//love4m.com/forum/smilies.php]


Looks like ownership problems @unix.

Get into the SSH --> to that directory

cd love4m.com/forum

then

chown user:apache * -R

user:apache = unix_username : unix_groupname

-R means that it will reset ownership permissions. The user = the name of that unix account.

If you have a different configuration of permissions and ownerships, then you need to identify the ownership of other files in that directory and change user = that_name and groupname.

Once in my case, the username did not exists for a directory and files because I had deleted the unix user. So only the UID:GID appeared.

So you may get an error if the file does not have proper ownership that the logged in account or that unix user does not exists. Check it out...

Monday, January 24, 2011

Migrating wpmu blog to new host

I have job to transfer wordpress multi user to new host. The wpmu system currently host 400+ with subdomain type.
The old host and new host use same operating system FreeBSD dedicated server but with different version.
The procedure for move wpmu to new host not different than moving ordinary wordpress blog.

Preparing and packing

1. Dumping mysql database
#  mysqldump -udtonet2 -pdotnet22008 dotnet2 > dotnet.sql
2. Packing all files to one tarball
# tar cvzf wordpress-mu.tar.gz  wordpress-mu
3. Transfer the file to new host
# scp wordpress-mu.tar.gz erau@172.88.1.8:/home/erau
Password:
wordpress-mu.tar.gz                    100%   402MB  13.9MB/s   00:03
#
4. Change dns setting
add wildcard to tinydns data file.
.batikweb.com:127.0.0.1:a:259200
.1.88.172.in-addr.arpa:127.0.0.1:a:259200
+batikweb.com:172.88.1.8:8640
+www.batikweb.com:172.88.1.8:8640
+*.batikweb.com:172.88.1.8:86400
@batikweb.com:172.88.1.11:mail.batikweb.com:10:86400
make file
# make
restart dns
# svc -t /var/service/tinydns/
# svc -t /var/service/dnscache/
check dns resolv
# dig batikweb.com
; <<>> DiG 9.3.4-P1 <<>> batikweb.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15165
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;batikweb.com.                        IN      A
;; ANSWER SECTION:
batikweb.com.         8640    IN      A       172.88.1.8
;; Query time: 0 msec
;; SERVER: 172.88.1.10#53(172.88.1.10)
;; WHEN: Tue May 11 09:59:31 2010
;; MSG SIZE  rcvd: 48
#

Unpack and restoring

This steps taken in new host.
Login to server 1.8
4. Move the file
# mv /home/erau/wordpress-mu.tar.gz  /home/dotcom
# cd /home/dotcom
# tar xvzf wordpress-mu.tar.gz
Change vhost
# ee /usr/local/etc/apache22/extra/httpd-vhosts.conf
add these lines :
<VirtualHost 172.88.1.8 >
ServerAdmin alam@hostingformula.net
DocumentRoot /home/dotcom/wordpress-mu
<Directory /home/dotcom/wordpress-mu >
AllowOverride FileInfo Options
</Directory>
ServerName batikweb.com
ServerAlias *.batikweb.com
</VirtualHost>
5. Create database
# mysql -ualam -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 590411
Server version: 5.0.77-log FreeBSD port: mysql-server-5.0.77_1
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input
statement.
mysql> create database wpmu;
Query OK, 1 row affected (0.01 sec)
mysql>
Grant all privileges
mysql> grant all privileges on wpmu.* to dtonet2@localhost identified by ‘dotnet22008′ with grant option;
Query OK, 0 rows affected (0.02 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql>
Import database
mysql> exit
Bye
#
6. Import database
# mysql -udtonet2 -pdotnet22008 wpmu < dotnet.sql
Change wp-edit.php to new host information.
#ee  wp-config.php
Which iPad To Buy
Waterproof Case for Ipad
Keyboard for Ipad
7. Restart Apache
# /usr/local/etc/rc.d/apache22 restart
Performing sanity check on apache22 configuration:
Syntax OK
Stopping apache22.
Waiting for PIDS: 793.
Performing sanity check on apache22 configuration:
Syntax OK
Starting apache22.
#
Check everything from browser and no problem so far.
Finish, mission accomplished.
wpmu cannot connect to database, wpmu coupon, wpmu transfer error, mu online experience formula, move wordpress mu to new, wpmu coupon code, tinydns answer section dnscache, change wp mu to another server, porting wordpress da hosting a hosting, transferring a wordpress mu site to a server, wordpress mu connect host, wordpress mu sql query, wordpress multi site change hosts, wpmu multi db grant, wpmu mysql assign user to blog, moving site from wp mu to wp on a new server, moving multiuser wordpress site cannot connect to database, dotnet mysql current connection id, how to migrate wordpress mu to another server, How to move wpmu to new host, how to transfer databases for wpmu to new host, how to transfer wordpress mu, idrive wordpress MU, migrating domain wordpress wpmu, migrating wordpress mu sql, move blogs between wordpress mu databases, move host wp mu, Move WPMU blog to new WPMU blog, moving a wordpress mu blog to new server, moving from wordpress mu, www batikweb com(Visited 165 times, 3 visits today)

Kloxo 500 – Internal Server Error

Kloxo control panel aka lxadmin in the past help me a lot in managing vps operational. I don’t have to touch configuration file for adding new domain, setting virtual host, grant database username and privileges etc. The other best part of this cpanel alternative are :
  1. It’s free ( I can asking for help or install it by myself)
  2. Low resources (specially memory where most  low end vps plan has limited)
Problem came when I must add new domain for my friend blog. I see this message after I enter username and password :

500 – Internal Server Error

I think it just small problem with service and  library conflict.
Restart Kloxo 1 st attempt :
Which iPad To Buy
Waterproof Case for Ipad
Keyboard for Ipad
# service kloxo restart
Stopping kloxo: Waiting for the process to die…..
Stopped kloxo
Starting kloxo: 11
mysqld (pid 30515) is running…
Started kloxo
Try again to login and I still get 500 – Internal Server Error message.
Restart Kloxo 2nd attempt :
# /script/restart
Stopping kloxo: ../bin/common/function.sh: line 28: 16364 Terminated              $__path_php_path $__path_server_path $string > /dev/null 2>&1
Waiting for the process to die…..
Stopped kloxo
Starting kloxo: 11
mysqld (pid 30515) is running…
Started kloxo
I still get 500 – Internal Server Error message after entering username and password.
Searching around (I forgot source url) I try to downgrade ssl.
# yum downgrade openssl
Loaded plugins: fastestmirror
Setting up Downgrade Process
Loading mirror speeds from cached hostfile
* addons: mirror.5ninesolutions.com
* base: centos-distro.cavecreek.net
* extras: mirrors.versaweb.com
* updates: centos-distro.cavecreek.net
addons                                                                                                                                        |  951 B     00:00
base                                                                                                                                              | 2.1 kB     00:00
extras                                                                                                                                          | 2.1 kB     00:00
lxlabslxupdate                                                                                                                            951 B     00:00
lxlabsupdate                                                                                                                            |  951 B     00:00
updates                                                                                                                                      | 1.9 kB     00:00
Resolving Dependencies
–> Running transaction check
—> Package openssl.i686 0:0.9.8e-12.el5_4.1 set to be updated
—> Package openssl.i686 0:0.9.8e-12.el5_4.6 set to be erased
–> Processing Dependency: openssl >= 0.9.8e-12.el5_4.4 for package: mod_ssl
–> Running transaction check
—> Package mod_ssl.i386 1:2.2.3-31.el5.centos.4 set to be erased
–> Finished Dependency Resolution
Dependencies Resolved
=============================================================================
Package                             Arch                             Version                                              Repository                             Size
=============================================================================
Installing:
openssl                             i686                             0.9.8e-12.el5_4.1                                    updates                               1.4 M
Removing:
openssl                             i686                             0.9.8e-12.el5_4.6                                    installed                             3.3 M
Removing for dependencies:
mod_ssl                             i386                          1:2.2.3-31.el5.centos.4                           installed                             173 k
Transaction Summary
=============================================================================
Install      1 Package(s)
Update       0 Package(s)
Remove       2 Package(s)
Total download size: 1.4 M
Is this ok [y/N]: y
Downloading Packages:
openssl-0.9.8e-12.el5_4.1.i686.rpm                                                                                                              | 1.4 MB     00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing     : openssl                                                                                                                                         1/3
Erasing        : mod_ssl                                                                                                                                         2/3
warning: /etc/httpd/conf.d/ssl.conf saved as /etc/httpd/conf.d/ssl.conf.rpmsave
Cleanup        : openssl                                                                                                                                         3/3
Removed:
openssl.i686 0:0.9.8e-12.el5_4.6
Dependency Removed:
mod_ssl.i386 1:2.2.3-31.el5.centos.4
Installed:
openssl.i686 0:0.9.8e-12.el5_4.1
Complete!
#
Restart Kloxo 3rd attempt :
Using command in 1st or 2nd attempt bring me this display
kloxo is up Kloxo and 500   Internal Server Error
Case closed
kloxo 500 - Internal Server Error, kloxo Internal Server Error, kloxo Could not connect to Mysql server, kloxo, 500 - Internal Server Error kloxo, kloxo 500 internal server error, uninstall kloxo, remove kloxo, Internal Server Error KLOXO, kloxo 500 error, kloxo error 500, install kloxo in centos error mysql, restart kloxo, kloxo addons, 500 internal server error kloxo, 500 Internal Server Error how to, error kloxo after shutdown, Stopping kloxo: /bin/common/function sh: line 28, wordpress internal server error Kloxo, kloxo /bin/common/function sh, openssl-0 9 8e-12 el5_4 1 i686 rpm, Starting kloxo: 11 Could not connect to Mysql server, reinstall mysql kloxo, starting kloxo, Kloxo mysql error, Stopping kloxo: /bin/common/function sh, centos 500 kloxo - Internal Server Error, vps 500 - Internal Server Error, kloxo restart, kloxo not restart, kloxo not working 500 internal server error, kloxo function sh, stopping kloxo, kloxo email problem, internal server error 500, kloxo internal server erro, error log file kloxo, kloxo webmail internal server error, download openssl-0 9 8e-12 el5_4 1 i686 rpm, Stopping kloxo: /bin/common/function sh: line 28:, server i kloxo, $__path_php_path $__path_server_path $string > /dev/null 2>&1, starting KLOXO in shell, cai kloxo 500 - Internal Server Error, Stopping kloxo: /bin/common/function sh: lineTerminated, kloxo reboot Internal Server Error, kloxo reboot Could not connect to Mysql server, kloxo pserver-localhost default, upgrade mysql in kloxo, kloxo remove script(Visited 1,509 times, 20 visits today)

 
Design by Laikeng | Bloggerized by Storesu - sutoday | Court