Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Hi! After installing apache, php, and mysql I was trying to figure out a good way to make it so that I would always have root abilities in that folder, and I found a tutorial that used sudo rm -r as an example of a command a newbie might not understand. (There is no explanation of what tha command does on the page.) Not thinking, I tried executing it on the /var/www folder thinking it might be the solution. It deleted the folder. Great...
So, I decided to try just making the folder again with sudo mkdir www and that worked, but the phpmyadmin folder is, of course, not there. What would the steps be to get that folder made again.
You need to remove and re-install everything that was impacted by your rm. If you can't determine what that was with any degree of certainty, then starting clean might be easier and safer.
The comment "Recover the deleted files from backup" implies that you are taking regular backups to protect yourself from just such an incident. You would then use the backed-up data to replace the files you've deleted.
If you are using the ext3 filesystem, forget about recovering from an rm. You can't.
You need to reinstall PHP and phpmyadmin. Get the PHP packages for your distro and force a reinstall. With Ubuntu, you'll have to study how to make apt install even if it thinks the package is already installed.
Phpmyadmin is no biggie; you can get it from sourceforge and since it is all PHP (just scripts) installation doesn't require a package manager; just create the directory for it, copy all the scripts in, then manually configure the details (all covered in the docs that come with phpmyadmin).
Ugg.. wish I had know that before I messed up php. Am I correct that I can't just use a different user account? I am afraid I have already kind of messed up the reinstall. If I force a reinstall will that change back the configuration stuff?
A reinstall of an application 'should' not replace the configuration files if they have been changed by you. you could always back up those config files though just in case... copy them to a folder in your user directory or something..
I would just walk through that how-to again from the start.. if you tell it to install something that already exists aptitude will skip it and tell you it's already installed. so just continue to the next step, till you complete the how-to again and hopefully everything will work itself out.
Just mark this up to a learning experience (experience is what you get, when you don't get what you want) you will remember it and likely not make the same mistake again. we've all been there, don't worry about it too much it's part of the learning process, and once you complete this project you'll know more about your system and Linux for having made the mistake. (see there is a bright side )
if you get hung up on anything while following the how-to again pop back in here and post teh errors you get and we'll help you work through them.