JDS Media Tivoli deployment and integration
  • About
    • IBM Software Reseller
    • Curriculum Vitae : Jim Sander
  • Downloads
  • Contact
  • Documentation
  • Downloads
  • Event Management
    • Omnibus72x
    • TEC
  • ITM
    • ITM6.x
      • TDW2.x
      • TEPS
  • Non-Tivoli
    • Uncategorized
    • webservices
      • web_programming
    • WindozeMiscellaneous
  •    
  • Posts
  • Comments

Quick and Dirty LAMP

By
jimsander
Published: June 26, 2009Posted in: webservicesTags: apache php, database, database test, fc4, Fedora Core, GRANT ALL, MySQL, PHP, php phpinfo, root, root account, sbin, user
  • Comments [0]
  • Digg it!
  • Facebook

Installing a LAMP stack: Linux – Apache, PHP, and MySQL on Fedora Core

Assuming you already have Linux and Yum installed.

1. Install Apache (httpd), PHP, MySQL (server and client), and the component that allows
php to talk to mysql.

 yum -y install httpd php mysql mysql-server php-mysql

2. Configure the new services to start automatically

  /sbin/chkconfig httpd on
  /sbin/chkconfig --add mysqld         [this is not required with FC4 and above]
  /sbin/chkconfig mysqld on

  /sbin/service httpd start
  /sbin/service mysqld start

3. IMPORTANT! Set up the mysql database root password. Without a password, ANY user on the box can login to mysql as database root. The mysql root account is a separate password from the machine root account.

 mysqladmin -u root password 'new-password'           [quotes are required]

4. Make additional security-related changes to mysql.

 mysql -u root -p

 mysql> DROP DATABASE test;                            [removes the test database]
 mysql> DELETE FROM mysql.user WHERE user = '';        [Removes anonymous access]
 mysql> FLUSH PRIVILEGES;

5. Following the above steps, the document root for Apache is /var/www/html/

Create a test PHP script (such as phpinfo.php) and place it in the document root. A useful
test script sample:

 <?php
    phpinfo();
 ?>

6. Create a database and database user for your data. You will use this database and user name
in your database connection string. The GRANT statement actually creates a new MySQL user account.

 mysql> CREATE DATABASE web_db;
 mysql> GRANT ALL PRIVILEGES ON web_db.* TO 'web_user'@'localhost' IDENTIFIED BY 'thepassword';
  • Share/Bookmark
  • Comments [0]
  • Digg it!
  • Facebook

About the Author

In the IT field for 17 years. Experience includes consulting, project management, technical support, software development and implementations. Specialized in the area of enterprise implementations and distributed systems management. Provided services to many Fortune 500 companies as well as the government agencies. Provided services as ITM specialist in providing a complete enterprise management solution including rapid deployment, automation, monitoring, and real-time reporting of a Tivoli environment.

No Comments

Start the ball rolling by posting a comment on this article!

Leave a Reply




XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Cancel Reply

CAPTCHA Image CAPTCHA Audio
Refresh Image
  • Agent amp base box CANDLEHOME cygwin database Documentation Enterprise Event file filesystems grep ibm infocenter itm kux Linux lt Omegamon pattern perl PID Problem process publib boulder Request root script Scripts server shell situation slots STRING table tar TEC TEPS time Tivoli tivoli enterprise tmp unix user Documentation (2)
    Downloads (1)
    ITM (6)
    ITM6.x (9)
    Non-Tivoli (10)
    Omnibus72x (1)
    TDW2.x (1)
    TEC (2)
    TEPS (2)
    Uncategorized (1)
    webservices (1)
    web_programming (1)
    WindozeMiscellaneous (2)

    WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.

  • Most Read Articles
    • T/EC Regular Expressions
    • Extract TAR files over SSH
    • ITM6 : Take Action : Remount Stale remote filesystems
    • Parse Download Director dlmgr.pro
    • ITM6 Situations as TEC Events
  • Recent Articles
    • ITM6 : Take Action : Remount Stale remote filesystems
    • ITM Logs Timestamp Conversion
    • ITM : Testing Windows Event Logs
    • ITMv6 Process string length limitation
    • IBM Tivoli Monitoring Product Codes
  • Downloads
    • parse_ddpro.tgz (1.2 KiB, 258 hits)
    • Sample_TDW (unknown, 9 hits)
      You do not have permission to download this file.
    • Copyright