centos install] how to install program in the user account using yum - centos

I'm now using centos5.8 .
And I'm not administrator, I mean I'm just have user account, not root.
Currently I'm installing program in this way.
Download source and move to the my account and install using make.
But current way is too difficult to me.
So I really want to use more easy way.
Like sudo apt-get install.
Yum looks like that.
But when I tried to use yum, he required root account.
I know root password but..
Can I use yum?
I'm afraid about it can destroy the whole system.
I just want to change my account not shared directory and file.
I want to install program in /home/ME/
not ../../etc ../../bin
How can I do this?
And is it safe to use yum?
Thank you in advance,

If you want to use Yum, you need to have root access.
You can compile and run application in your home directory without root access, but systemwide installing using yum is not possible without root access.

Related

How can i install two different version perl on my linux?

I have a Linux server, and it has its own Perl whose version is not what I want. So I want to install another Perl on it.
I tried to solve it with Perlbrew, but my server can't download it. It seems like my server does not trust that website address. And I don't know whether I should download it as root. Besides, I think there is a huge difference between root and a normal user to download and install it, and I just want do it as a normal user.
Is there another way install different version Perl on my server?
I downloaded the version I want before, and I tried to install it in a usual way, but it just failed.
Here is the wrong when I tap the command
wget -O - https://install.perlbrew.pl | bash as a normal user.
Maybe I should tap it as root?
And when I try to install the Perl v5.8.8(this is version I want) in ~/bin,i run the Configure.
But I can not run make after that, it just told me that make:No rule to make target , needed by miniperlmain.o Stop.
Besides,
my Linux is Centos 7.4. I don`t how to fix it.
It seems that I find a way to let me to make.
Here is the link.
After I edit the makedepend.SH, I run make again. But I got this wrong:
The thing is really weird. Why Perl V5.8.8 is so difficult to install.
The easy answer is 'just install perl' - it'll drop by default into /usr/local/bin, and you can just use that instead.
DON'T overwrite /usr/bin/perl, as that's a recipe for pain. (Lots of stuff will have dependencies on perl versions installed via your package manager).

can I safely clone perl lib to another location on a computer?

I have my own personal perl instance, using perlbrew and a local cpan instance. I put in a bit of effort to get cpan to work for my local install. I've configured code and tested it using this perl.
I now want to ensure anyone on the computer can use the perl code I wrote, meaning ensuring that the cpan modules I used are available to all, even those that can't access my home directory.
Unfortunately, I can't configure and use cpan as root user. There are a few reasons why this would be difficult, but the biggest is that I am using my personal cert to authenticate myself as part of connecting to the CPAN repo (needed due to the configuration of the system). I don't want to make my cert available to everyone for connecting to CPAN.
I'm wondering if, instead of fixing the root cpan instance and trying to hunt down all the modules I'm using with cpan, I can simply copy the modules I already have. I'm running with the same perl version and on the same architecture, so the modules in my personal home directory should be the right ones.
The problem is that perllocal.pod seems to hard code locations relative to where my instal was done, so a simply copy paste is not enough. Is there another easy way, possible a perl utility, to copy my local CPAN modules and perl lib directory over to the root perl lib directory?
Probably, but why don't you just give them permission to your perlbrew-installed perl. Then just continue to use #!/home/ikegami/usr/perlbrew/perls/5.22.0t/bin/perl or whatever.
If you don't know exactly what you have installed, you could have a look at Dist::Surveyor
If you already know what all of your deps are, you can list them in a cpanfile and then take a snapshot with Carton and use the generated cpanfile.snapshot to install the correct versions in the new location
you can clone the whole CPAN to your server for everyone to install
minicpan -l ~/CPAN -r http://ppm.activestate.com/CPAN/ [-f]

Deploying meteor app to a webserver

Does anyone know a step by step guide to deploy the own meteor app from windows to a webspace (not xxx.meteor.com).
I've found some tools like meteor.sh, but I'm a beginner and it's difficult without a guidance and without linux (needed to execute sh-files for example)
Make your project locally
Build your project locally, you could test it using meteor run or even meteor deploy xxx.meteor.com to see if its working
Bundle your app
Use meteor bundle deploy.tar.gz to make a file called deploy.tar.gz in your meteor directory containing your project
Upload your file to your server
This depends more on how your server is/what your platform is but you can use a tool to upload it for you (e.g Transmit on mac)
Install node.js & fibers on your platform if you don't have it already
This depends alot on your server platform. Have a look at http://nodejs.org/ for more detailed instructions
Extract your bundle
If on a *nix platform you could do the below in the directory where you uploaded your bundle (explanation):
tar -xzvf bundle.tar.gz
Enter the directory and install fibers
Fibers is needed for any meteor project, it helps use synchronous style code on server side javascript:
cd bundle/programs/server/node_modules
rm -r fibers
npm install fibers#1.0.1
The first line enters the directory in your bundle where fibers is installed, the second removes it, and the third reinstalls it.
Get MongoDB on another server or use a third party service like mongohq
Meteor production deployments need another mongodb. You can either install it on another server or use a third party server. It's not recommended to install it on the same server you install meteor on.
Finally check if your project is runnable
cd ../../../
node MONGO_URL=mongodb://dbuser:dbpassword#dbhost:dbport/meteor ROOT_URL=http://yourwebsite.com app.js
The first line gets you back to the bundle directory and the second runs node.js on your project with the parameters that let you connect to your mongodb database.
Install something to let it run in the background
It depends on which one you want to use, foreverjs is quite easy to use
npm install forever -g
If you get an error problem try using sudo before the npm (which lets you run as a super user).
Then you can run forever:
forever start MONGO_URL=mongodb://dbuser:dbpassword#dbhost:dbport/meteor ROOT_URL=http://yourwebsite.com app.js
And its done!
Extra notes
While its not that easy to get started from scratch this should help you get started. You still need to secure your mongodb server up if you've used your own servers.
The meteor.sh script does pretty much the same as above but very quickly if you learn to use that instead it might be faster to deploy updates
You might not have wget or a couple of commands that you might need that come up and give you Unknown command errors. Have a go at running yum or apt-get and see which one of the two you might have. You can then install the required package using one of these installer tools, i.e with yum install wget
I hope this helps you, its not that easy to deploy to a server on the first shot as a couple of things might be missing (files/packages/dependencies), you might run into other problems with permissions & stuff, but you could always ask on serverfault or here on stackoverflow on what you run into.
I recommend Meteoric.
Note, that you need to run meteoric from your development machine.
Script is self explanatory and works perfect for me.

cannot change these permissions .CPAN

I have a problem when i want to install CPAN module
I type cpan to install cpan , but i get this error :
mkdir /home/cyrine/.cpan/CPAN: Permission >denied at
/usr/share/perl/5.10/CPAN/Shell.pm line 656
How can I change these permissions?
Probably the CPAN directory is owned by root; you can check this by doing ls -l /home/cyrine/.cpan.
There are two ways of fixing this:
If you have sudo access to the server, use that when installing and using CPAN.
Delete or rename the entire /home/cyrine/.cpan directory (either mv ~/.cpan ~/.cpan-old, or rm -rf ~/.cpan).
It appears that you have a permissions issue with your home directory. Maybe someone else installed Perl modules in your home directory, and therefore you don't own those folders?
If you can't resolve the underlying permissions issue, there are several approaches to installing Perl modules without root privileges. You could use these to install modules in another location that you do have permission to access.
Local::Lib allows you to maintain your own local library of Perl modules which you install in your home directory. It gives instructions for installing the module itself if you don't already have it.
Perlbrew is a very simple-to-use tool that allows you to maintain your own separate installation of Perl (and install modules) in your home directory.
If that isn't enough, browse through some of the previous questions on this issue for more.

Local cpan builds

I'd like to use a home directory specific, non-root directory for stuff I install from cpan. How can I configure it?
Normal CPAN configuration tries to install packages into /usr. After adding 'makepl_arg' => q[PREFIX=~/cpan_local], simple packages seem to build, but I cannot build a package that pulls its dependencies - the dependency is not found.
After I changed it to 'makepl_arg' => q[PREFIX=~/cpan_local LIB=~/cpan_local], I get the following message: Warning: Prerequisite 'ExtUtils::CBuilder => 0.27' for 'D/DA/DAGOLDEN/Module-Build-0.3607.tar.gz' already installed but installation looks suspicious. Skipping another installation attempt, to prevent looping endlessly.
How can I configure this properly? I want everything that's built to do to ~/cpan_local automatically. (or for people familiar with python, I'd like this to work like virtual-env and running easy_install from it).
Even better, install App::cpanminus first. Then just use it to install modules as a regular user. If this user can't write to the /usr/local/lib/perl* directories it will resort to writing in its home directory, or you pass it the -l or --local-lib option to directly install it in your home directory without it figuring out if it can install them system wide.
Finally, installing local::lib and setting up your environment automatically with your .bashrc file will allow you to omit the --local-lib option and install to your home directory directly.
Use local::lib. The bootstrap instructions should do the trick for you.