{"id":28,"date":"2006-01-30T00:52:00","date_gmt":"2006-01-30T00:52:00","guid":{"rendered":"http:\/\/10.168.29.5\/blog\/?p=28"},"modified":"2006-01-30T00:52:00","modified_gmt":"2006-01-30T00:52:00","slug":"linux-tribulations","status":"publish","type":"post","link":"https:\/\/davidsterry.com\/blog\/2006\/01\/linux-tribulations\/","title":{"rendered":"Linux tribulations"},"content":{"rendered":"<p>Today was a big day for me and Linux. I started the day with a Linux web server with PHP but no MySQL. That&#8217;s a LAP server for all you techies. Pretty decent for serving static pages but not too great when it comes to doing anything with data.<\/p>\n<p>Never had MySQL working on this thing so I did a &#8220;yum install MySQL-server&#8221; to install MySQL. Then it was time to start this server up! Nothing. Well, not nothing. I got an error and a message that MySQL ended. Did a little searching and found a thread on this problem recommending that SELinux was the problem. It was keeping MySQL from accessing it&#8217;s database storage files. I used the command &#8220;setenforce 0&#8221; and all was well. I&#8217;m not sure if that&#8217;s a permanent change but hopefully it is. (A tip I got in my chatroom was to use &#8220;tail -f \/path\/to\/logfile&#8221; to watch a file when something&#8217;s going wrong. It shows you a live view of the log so you&#8217;ll want to open it in a separate terminal)<\/p>\n<p>Once I had the MySQL server running, I set a new password and I thought I&#8217;d install phpmyadmin to see if I could control it using the web interface I&#8217;m so familiar with. Not so fast bucko. PhpMyAdmin complained that MySQL support was not available to PHP! I created a test script to show me phpinfo() and then saw that PHP was compiled with &#8211;with-MySQL=shared,\/usr<\/p>\n<p>That&#8217;s supposed to mean that MySQL support is loaded as an extension to PHP but I could not find a suitable extension on my system. So I thought, I&#8217;ll just compile PHP. I downloaded the latest stable source for PHP4, compiled it, configured it and tested my PhpMyAdmin again. Nothing. Seems PHP was compiled into apache so my changes really didn&#8217;t take effect.<\/p>\n<p>Finally, I decided to compile apache and PHP from source. Apache would be compiled to load PHP as a module and PHP would be compiled with built-in support for MySQL. I downloaded and compiled apache 2 from source. Once both of those were built and installed, I manually added lines to the httpd.conf to activate PHP. At this point, things were running well. I had a LAMP server!<\/p>\n<p>I could use PhpMyAdmin but unfortunately so could anyone else with access to my webserver.<br \/>The solution to that: add .htaccess to the PhpMyAdmin folder so a username and password are required to get in there. It&#8217;s been a great learning experience and I kind of want to do it again on another box to see just how much of what I&#8217;ve learned applies to my next LAMP setup.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today was a big day for me and Linux. I started the day with a Linux web server with PHP but no MySQL. That&#8217;s a LAP server for all you techies. Pretty decent for serving static pages but not too great when it comes to doing anything with data. Never had MySQL working on this [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-28","post","type-post","status-publish","format-standard","hentry","category-default"],"_links":{"self":[{"href":"https:\/\/davidsterry.com\/blog\/wp-json\/wp\/v2\/posts\/28","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/davidsterry.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/davidsterry.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/davidsterry.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/davidsterry.com\/blog\/wp-json\/wp\/v2\/comments?post=28"}],"version-history":[{"count":0,"href":"https:\/\/davidsterry.com\/blog\/wp-json\/wp\/v2\/posts\/28\/revisions"}],"wp:attachment":[{"href":"https:\/\/davidsterry.com\/blog\/wp-json\/wp\/v2\/media?parent=28"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/davidsterry.com\/blog\/wp-json\/wp\/v2\/categories?post=28"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/davidsterry.com\/blog\/wp-json\/wp\/v2\/tags?post=28"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}