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!
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am not very sure about the following two questions, I have install some packages on my Linux system, though.
Q1. Should I log in as root to install a software package on a Linux system?
Q2. If I log in as a common user, say 'Mike', and install a software on Mike's home directory, then do other users on the system have the access to the software. Or I have to use 'export' to export some software libraries.
If you want the software to be available to all users on your system you should install it as root.
If you install it to Mike's home directory, only Mike (and whoever has access to his directory) will be able to run it. They will also only have access to the files and libraries a normal user will have.
If you want the software to be available to all users on your system you should install it as root.
If you install it to Mike's home directory, only Mike (and whoever has access to his directory) will be able to run it. They will also only have access to the files and libraries a normal user will have.
Thanks,
>If you want the software to be available to all users on your system >you should install it as root.
Ok, i see I should install a software as root. Then another question, usually where Should I install a software on a file system, under /opt/?
>If you install it to Mike's home directory, only Mike (and whoever has >access to his directory) will be able to run it. They will also only >have access to the files and libraries a normal user will have.
I have install a software in to Mike's home directory. How to remove the software from the system COMPLETELY. In Windows system, to do this I go to 'Control Panel', and then go to 'Add and Remove software'. How to remove a software on Linux system.
To install software on linux you should use whichever package management tools your distribution provides. This, of course, depends on the distribution that you are using.
You shouldn't install the software manually on your own unless it's for a very good reason. So, read the docs of your distro about installing/uninstalling software, or at least, let us know what distro do you use so we can tell you which is the correct tool.
To your first question, the software will put itself wherever the packager wrote it to - whether /usr/lib or /etc or wherever. If you hand compile from a tarball, you can pass options to ./configure - the README or INSTALL file or running ./configure --help will show you the options.
Uninstalling depends very much on how you installed it. If it's from a package, your package manager will be able to uninstall. If you used checkinstall or if the developer programmed it in, running make uninstall on the tarball should uninstall it.
In extreme circumstances, you would have to find out where the files installed to and manually delete them from your system.
Putting your distro in your user profile will help us give you more specific advise. Most distros have a graphical package manager. Typically starting the package manager, you will be asked for the root password. The the package manager program will run as root. I just wanted to make sure you didn't think that you needed to log in as root to install packages. Some distros also have a command line tool you can run as well. In this case you will probably use "sudo" before the command.
There are advantages to turning to your package manager and searching for the package you want. The version of the package will be built with the library and compiler versions that your distro uses. This can prevent dependency problems. For a kde or gnome program, it may be packaged so that the menu item will show up in your desktop. Some distro's support multiple desktop managers and installing the package will install a menu item for whichever desktop you switch to. Also if there is a security patch for a particular package, a delta-package will be produced for it and your distro's update system will take care of it. If you had built a package yourself, you will need to monitor for security issues yourself, download the patch, apply the patch, rebuild and reinstall.
Thank you all for your advices. To express my question clearly, I use a real example. Actually, I would like to install Clucene(http://sourceforge.net/project/showf...ease_id=533576), a open source text search engine, on my linux sysem.
To build, I follow these steps suggested in the instruction file INSTALL.
""""""
The following will get you building assuming that you have suffciently
recent buld tools installed.
1.) unpack tarball
2.) cd into clucene
3.) if you downloaded a tar version skip to 5
4.) run ./autogen.sh
5.) run ./configure
6.) run make
7.) things will churn for a very long time, the clucene library will
be built as well as the examples.
8.) check the src/demo, test and src directory
""""""
I have successfully install clucene on my linux system as a normal user.
However, I am not sure if this is a correct way to install software. Can other users use clucene? How to uninstall clucene in some time in the future.I can find no uninstall tool shipped with the package. How to remove clucene in this circumstances.
Your step 9 is to either su into root (or use sudo) and then to run make install. As far as uninstalling goes, if the dev has written it in, make uninstall would remove it. You could also use a package called checkinstall which allow you to uninstall.
You don't mention your distribution of Linux. If you run a Debian based distro (debian, ubuntu, mint, etc etc) or an RPM based distro (red hat, mandriva, fedora, suse, etc etc) there may well be a package available in that distro's format which will greatly change the way you install and uninstall.
However, I am not sure if this is a correct way to install software.
Usually, no. Unless your distro doesn't already provide packages for that software. Read my previous post, and learn to use your package manager.
Quote:
Can other users use clucene?
No, unless you "make install" it as root.
Quote:
How to uninstall clucene in some time in the future.
If you installed it with "make install", you can usually uninstall it with "make uninstall". The downside is that you need to keep the source tree. Sometimes there's an uninstall.sh script or similar. The program readme files might have instructions for that as well.
No reason to build it manually, if it's already in the package repositories..
But since you don't list your distro, I guess no-one could help you determine if it's available in your distro..
Update your profile with your distro, it will make your life and ours much easier..
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.