Wanting to do project involving Linux & need guidance.

raksasas

Limp Gawd
Joined
Dec 14, 2002
Messages
477
Sorry I little about linux and dabbled a little with Ubuntu here and there. So please be patientt with me.

Machine:
Processor: Intel(R) Celeron(R) CPU 430 @ 1.80GHz
RAM: 1GB
Video: Integrated - Intel(R) Q35 Express Chipset Family
Hard Drive: 74.5GB

Project
Main Part: I am wanting to run a Wiki for my work group/section so that we can share information with each other easily.

Second part: I need to track hard drive space over time on several machines. I have been running Space Track for a bit on a windows machine. Though it would be an added bonus to run something like this on this machine that I will use as a server for the wiki.

Would anyone be willing to help/guide me a bit through this?
 
Did you have a particular Wiki software in mind? Most probably you will just need a server with working web server, PHP and MySQL, depending on the software you want to run. There are plenty of guides out there on how to get these basic packages up and running, then it should just be a matter of following the documentation for whatever software you're using.

Give it a try, and if you run into trouble I'm sure people here will be willing to help you out, but it's really pretty straightforward.

Look at Cacti for system monitoring.
 
I'd just run a simple server OS, such as Ubuntu Server. You'll want to install Apache2, PHP5, and MySQL to run a web server. There are other things that come in handy, but those are the minimum.
 
I have chosen to go with CentOS for the server OS. For the Wiki I am going to go with MediaWiki. Then as recommend for system monitoring Cacti.

Is this a decent guide to follow for setting up CentOS - CentOS Install Guide
 
That looks pretty good. Linux is getting quite simple to install compared to how it used to be. Most can be installed via a GUI, and they tend to be very straight forward :)

CentOS is a good choice. It's based of RHEL, which is the enterprise version of Red Hat, common for servers. RHEL costs money however, so CentOS is a free adaptation.
 
Okay. I have installed CentOS with the following
Desktop - Gnome
Server
Server - GUI

Firewall - Secure WWW and WWW

SELinux - Disabled

I guess my next step is to install Apache...
 
Don't forget php5 and mySQL :) phpMyAdmin is a nice web front-end for SQL databases as well, and is in the repositories.
 
Your goal is very easy to obtain. I recommend you use Ubuntu Server 10.04 or CentOS. Really the distribution of Linux doesn't matter at all. I use and recommend 'MediaWiki'.

Just install the following:

Code:
yum install apache mysql php

or

Code:
apt-get -y install apache mysql php

Post back if your run into any problems.
 
Sorry had to put this on hold for a little bit. Thanks Carlosinfl. I used the command:
Code:
yum install apache mysql php
like you provided and I got the following:
Code:
Loaded plugins: fastestmirro
loading mirror speeds from cached hostfile
*addons: mirror.raystedmen.net
*base: mirror.raystedmen.net
*extras: mirrors igsobe.com
*updates: pubmirrors.reflected.net
Setting up Install Process
No package [B]apache[/B] available
Package mysql-5.0.77-4.el5_5.4.i386 already installed and latest version
Package php-5.1.6-27.el5.i386 already installed and latest version
Nothing to do

I am looking at this under the Set up Apache section.
 
try "yum search apache" and see what comes up, this might give you a lot of output (depends on apache's modules and such so you could read it with less "yum search apache | less"
 
I tried "yum install apache2" and got the following:

Code:
No package apache2 available

I ran "yum search apache" and I am not sure what I am looking at or looking for in the output.

I take it that "yum search apache | less" is for looking at the response line by line.
 
Okay. I have verified that PHP, MySQL, and Apache are installed.

Found I needed to start Apache with the following commend: "service httpd start"

From I fired up the browser and went to:
http://localhost and http://IP Address

At that point I got a Apache 2 test page.

From here out I am not sure if I am skipping any steps.

So I browse over to mediawiki and start following the install guide - here
I run "wget http://noc.wikimedia.org/mediawiki-1.16.0.tar.gz" in the terminal and it download the file. I then run "tar xvzf mediawiki-*.tar.gz" to uncompress like it says.

Since I don't know how to rename folder/files and cut/copy/paste yet in the terminal I log in as root fine the folder Mediawiki-* and rename it to mw for short. I then Copy the files over to /Var/www/ folder and past the files

I open the Terminal up and then "cd /var/www/mw/" to change the directory. Following that I type "chmod 777 config".

I am now at the point of creating the database. Since MySQL is installed I jump right to Step 2 check and see if the database server is running to under the Create a Database section. So I "sudo /user/local/mysql/bin/safe_mysqld &" and i get the following:


- [1] 3885
- [root@localhost ~]# sudo: /user/local/mysql/bin/safe_mysqld: command not found.

Sorry for my lack of knowledge at this point. and Google isn't being of much help for me at the moment. I think i am just getting a little frustrated at this point.
 
For mySQL Databases, it'd probably be easiest to install phpMyAdmin or something similar. It will make your life a lot easier.
 
With yum & CentOS you'll need to be a bit specific on package installations. Make sure that the mysql server is installed and not just some utilities or whatnot.
(as root)
Code:
server:~# yum install mysql-server

Most of the time I use the startup/shutdown scripts located in /etc/init.d/ to manage running services.
Example (as root): to start mysql
Code:
server:~# /etc/init.d/mysqld start
and Apache
Code:
server:~# /etc/init.d/httpd start

You can generally count on the scripts in this directory to do the following:
start -> launches the service
stop -> gracefully shuts down a service
restart -> restarts the service (is a stop followed by a start)
status -> tells you if the service is currently running.

When you start MySQL for the first time, you should get a big block of text with status about the service initialization as well as instructions to setup and secure your database root user with a password. (using mysqladmin IIRC)

Now you should have a running mysql server. Next you're going to want to have a way to effectively manage your server. Depending on your desire for knowledge, you could do things through the CLI by using SQL, or you can setup phpmyadmin in your web path and admin it through the web browser.

Short list for after that: you'll want to create a database and a user for mediawiki to use. Give the mediawiki user the appropriate level of rights to that database. Begin your mediawiki install through the web browser.

The mediawiki install will bark at you about things you're inevitably going to be missing.
ex: php-gd, php-mcrypt, so on and so forth. It should be able to adequately tell you what modules it'd like. You may just have to do a bit of "yum search ____" and such. After installing php modules you'll want to restart Apache for them to take effect. (Think server:~#/etc/init.d/httpd restart)

There may be a few more things you may have questions about, but hopefully this post will get you further down the road. GL!
 
I was getting frustrated and had my mind stuck on getting mediawiki working at this point. As I said I may have been skipping steps that was assumed "you" already knew in the install guide. After coming back a few hours earlier and looked at what was needing to be done. So I started looking for informatoin on that particular topic "starting and created a mysql database +centos". Since it was the end of the work day I wrote down some commands and noted what they are supposed to do.

Jesse B
For mySQL Databases, it'd probably be easiest to install phpMyAdmin or something similar. It will make your life a lot easier

I have come across phpMyAdmin mentioned several times. So with it being seen many times it must be a must have. With that in mind, I guess i need to find what I can about installing phpMyAdmin. I did try:
Code:
yum install phpMyAdmin
Which didn't work.

With yum & CentOS you'll need to be a bit specific on package installations. Make sure that the mysql server is installed and not just some utilities or whatnot.
(as root)
Code:
server:~# yum install mysql-server

Most of the time I use the startup/shutdown scripts located in /etc/init.d/ to manage running services.
Example (as root): to start mysql
Code:
server:~# /etc/init.d/mysqld start
and Apache
Code:
server:~# /etc/init.d/httpd start

You can generally count on the scripts in this directory to do the following:
start -> launches the service
stop -> gracefully shuts down a service
restart -> restarts the service (is a stop followed by a start)
status -> tells you if the service is currently running.

When you start MySQL for the first time, you should get a big block of text with status about the service initialization as well as instructions to setup and secure your database root user with a password. (using mysqladmin IIRC)

Now you should have a running mysql server. Next you're going to want to have a way to effectively manage your server. Depending on your desire for knowledge, you could do things through the CLI by using SQL, or you can setup phpmyadmin in your web path and admin it through the web browser.

Short list for after that: you'll want to create a database and a user for mediawiki to use. Give the mediawiki user the appropriate level of rights to that database. Begin your mediawiki install through the web browser.

The mediawiki install will bark at you about things you're inevitably going to be missing.
ex: php-gd, php-mcrypt, so on and so forth. It should be able to adequately tell you what modules it'd like. You may just have to do a bit of "yum search ____" and such. After installing php modules you'll want to restart Apache for them to take effect. (Think server:~#/etc/init.d/httpd restart)

There may be a few more things you may have questions about, but hopefully this post will get you further down the road. GL!

Thank for this bit of information.
If I am correct I can run this command to see if the package is installed:
Code:
rpm -q "package"

Also how does
Code:
service httpd start
compare to
Code:
 /etc/init.d/httpd start
 
I have come across phpMyAdmin mentioned several times. So with it being seen many times it must be a must have. With that in mind, I guess i need to find what I can about installing phpMyAdmin. I did try:
Code:
yum install phpMyAdmin
Which didn't work.
phpMyAdmin may not be in the default repository. This generally works in your favor because the web applications that are offered through repositories are usually older versions of the software and have been configured in funny ways. (funny is probably the wrong word, but it's the way the maintainer would set it up which can be different that what you'd do.)
Since it is a web application, installation is about as easy as going to http://www.phpmyadmin.net/home_page/index.php, download it, decompress, and stick the contents in you /var/www/html/phpmyadmin/ folder.
Here's the about: You'll have to get an older version of phpmyadmin since CentOS ships with php 5.1 and the current version of phpmyadmin requires php 5.2 or greater. From the phpmyadmin homepage click Download and select the .tar.gz from the 2.x branch -> phpMyAdmin-2.11.11.1-all-languages.tar.gz as of the time of this writing.

And again, be ready to fish up a few more php modules and restart apache. I forget what its gripes are from a base CentOS install, but I'm pretty sure there were one or two.

Thank for this bit of information.
If I am correct I can run this command to see if the package is installed:
Code:
rpm -q "package"
This will work if you have a particular package to verify.
so for checking php we'd do
Code:
frobozz@server1:~> rpm -q php
php-5.1.6-27.el5
and for checking php's gd module
Code:
frobozz@server1:~>rpm -q php-gd
php-gd-5.1.6-27.el5

But say you wanted to look at all of your php packages that are installed. You can use pipes and grep. (Don't want to throw more stuff at you, but you may think this is cool.)
Code:
frobozz@server1:~> rpm -qa |grep php
php-ldap-5.1.6-27.el5
php-mysql-5.1.6-27.el5
php-mbstring-5.1.6-27.el5
php-gd-5.1.6-27.el5
php-cli-5.1.6-27.el5
php-5.1.6-27.el5
php-common-5.1.6-27.el5
php-pdo-5.1.6-27.el5
What this does is take "rpm -qa" (which gives you a listing of ALL of the rpm packages installed) and sends the output into the grep program which then shows only the lines that contain "php". The result is all of your php packages installed. :cool:


Also how does
Code:
service httpd start
compare to
Code:
 /etc/init.d/httpd start
After looking at the man page (server:~>man service) :D, it looks like they do the same thing, and is actually probably the more correct way to go about it.
Code:
NAME
       service - run a System V init script

SYNOPSIS
       service SCRIPT COMMAND [OPTIONS]

       service --status-all

       service --help | -h | --version

DESCRIPTION
       service  runs  a System V init script in as predictable environment as possible, removing most environment vari-
       ables and with current working directory set to /.

       The SCRIPT parameter specifies a System V init script, located in /etc/init.d/SCRIPT.  The supported  values  of
       COMMAND  depend on the invoked script, service passes COMMAND and OPTIONS it to the init script unmodified.  All
       scripts should support at least the start and stop commands.  As a special case, if COMMAND  is  --full-restart,
       the script is run twice, first with the stop command, then with the start command.

       service --status-all runs all init scripts, in alphabetical order, with the status command.

FILES
       /etc/init.d
              The directory containing System V init scripts.
If you're using 'service' I'd say to keep going about it that way. Back up on post #16 it looked like you were calling some applications directly. The init scripts provide a lot of configuration information, do various checks such as permissions, and a few other things to try to ensure that the application will be successful at starting before it actually starts. It also makes management WAY easier.
 
Last edited:
For mySQL Databases, it'd probably be easiest to install phpMyAdmin or something similar. It will make your life a lot easier.

I don't agree. It only takes less than 30 minutes to learn and understand how to create a database and user for your project.
 
I don't agree. It only takes less than 30 minutes to learn and understand how to create a database and user for your project.

Or 3 minutes using my method. Nothing wrong with learning your way, I'm just lazy.
 
Or 3 minutes using my method. Nothing wrong with learning your way, I'm just lazy.

In the long run, knowing how to do it by hand might save time. ;)
Not that it matters much, really ... it's not as if creating the tables is where the work is.
 
I agree but I find it beneficial and helpful to understand how to interact with a database manually. Sometimes those PHP applications are not available and or just don't work and then the user is stuck but if he can login to the database and do this by hand, it's not that much effort.

PS - MySQL is awful. I highly recommend PostgreSQL for any database engine.
 
I agree but I find it beneficial and helpful to understand how to interact with a database manually. Sometimes those PHP applications are not available and or just don't work and then the user is stuck but if he can login to the database and do this by hand, it's not that much effort.

PS - MySQL is awful. I highly recommend PostgreSQL for any database engine.

True; it's useful to be able to SSH in and do whatever, or for that matter to write scripts to do it. (I lived with two mysql shells open in a konsole on screen#2 for a good while at work ...)
And I second the PostgreSQL thing. Both for technical and software-political reasons: I don't know what Oracle are planning for it, and while there are forks it's just a bit vague what the safest path forward is. (There will be one, though. MySQL isn't a dead end, it's just not the path I'd pick.)
 
Yes - I never been a huge fan of MySQL and their failure to adhere to SQL standards. Now add in the fact that Oracle has purchased Sun so the direction of MySQL taking light away from Oracle is cloudy. I've made the switch to PostgreSQL on all our database servers and couldn't be happier!!!
 
Thanks thus far, everyone. You have been a big help. I have gotten MediaWiki installed and working.

Now I am working on getting Cacti install and setup.
 
Update:
I have gotten CentOS, MediaWiki and Cacti installed thanks you guys. I am going to start 2011 by learning to use MediaWiki and Cacti. I will probably have some questions in regards to Cacti but that will be next year.

Thanks again.
 
Back
Top